Skip to content

Commit

Permalink
Add missing jv_copy when printing with -ar
Browse files Browse the repository at this point in the history
  • Loading branch information
wtlangford committed Nov 20, 2018
1 parent 2f2d05b commit a1f1231
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a1f1231

Please sign in to comment.