diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2013-05-11 18:10:21 +0100 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2013-05-11 18:10:21 +0100 |
commit | e29db8d272eff570071d84d735fcbfc9f6fbcdd8 (patch) | |
tree | 9478a39dae6c7ef44feaa2cd8ee5a9842e32f089 /execute.c | |
parent | 7ca5127fcc74ec2c58c1ad01de57d1c5ec00b827 (diff) |
Fix bug with path handling (used in assignments).
Closes #67
Diffstat (limited to 'execute.c')
-rw-r--r-- | execute.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -180,7 +180,8 @@ jv jq_next(jq_state *jq) { } if (!param) break; jv_dump(jv_copy(param->sv.value), 0); - printf("<%d>", jv_get_refcnt(param->sv.value)); + //printf("<%d>", jv_get_refcnt(param->sv.value)); + printf("<%d>", param->sv.pathidx); } if (backtracking) printf("\t<backtracking>"); @@ -298,7 +299,7 @@ jv jq_next(jq_state *jq) { jv_free(path_end.value); jv path = jv_array(); for (int i=path_start.pathidx; i<path_end.pathidx; i++) { - path = jv_array_set(path, i, jv_copy(jq->pathbuf[i])); + path = jv_array_append(path, jv_copy(jq->pathbuf[i])); } stack_push(jq, stackval_replace(path_start, path)); break; |