summaryrefslogtreecommitdiffhomepage
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 35a70fd..6f7638c 100644
--- a/eval.c
+++ b/eval.c
@@ -245,7 +245,7 @@ ut_ref_to_str(struct ut_state *state, uint32_t off)
return p;
case T_LBRACK:
- if (!op->val)
+ if (!op->is_postfix)
return NULL;
s = ut_ref_to_str(state, op->tree.operand[0]);
@@ -286,7 +286,7 @@ ut_getref(struct ut_state *state, uint32_t off, struct json_object **key)
return ut_execute_op(state, off1);
}
- else if (op && op->type == T_LBRACK && op->val) {
+ else if (op && op->type == T_LBRACK && op->is_postfix) {
*key = off2 ? ut_execute_op(state, off2) : NULL;
return ut_execute_op(state, off1);