diff options
author | William Langford <wlangfor@gmail.com> | 2018-11-20 09:58:25 -0500 |
---|---|---|
committer | William Langford <wlangfor@gmail.com> | 2018-11-20 09:58:25 -0500 |
commit | a1f1231a73c221155d539a281181ef37f874869d (patch) | |
tree | 4855d9f3f3aa25bd5b5da962716d0160fa96debb /src/main.c | |
parent | 2f2d05b0878a42878e10b02cf6d5e612e5985803 (diff) |
Add missing jv_copy when printing with -ar
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -168,7 +168,7 @@ static int process(jq_state *jq, jv value, int flags, int dumpopts) { while (jv_is_valid(result = jq_next(jq))) { if ((options & RAW_OUTPUT) && jv_get_kind(result) == JV_KIND_STRING) { if (options & ASCII_OUTPUT) { - jv_dumpf(result, stdout, JV_PRINT_ASCII); + jv_dumpf(jv_copy(result), stdout, JV_PRINT_ASCII); } else { fwrite(jv_string_value(result), 1, jv_string_length_bytes(jv_copy(result)), stdout); } |