Skip to content
Myr

Fix --raw-input

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Nicolas Williams · committed by Nicolas Williams · parent cca3e92 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:main.c+4 added-1 removed
191 unmodified lines
192 int len = strlen(state->buf); // Raw input doesn't support NULs193 if (len > 0) {194 if (options & SLURP) {195 state->slurped = jv_string_concat(state->slurped, jv_string(state->buf));196 } else if (jv_is_valid(value)) {196 } else {197 if (!jv_is_valid(value))198 value = jv_string("");199 if (state->buf[len-1] == '\n') {200 // whole line201 state->buf[len-1] = 0;202 return jv_string_concat(value, jv_string(state->buf));203 }204 value = jv_string_concat(value, jv_string(state->buf));205 state->buf[0] = '\0';206 }207 }208 } else {209 if (jv_parser_remaining(state->parser) == 0) {
413 unmodified lines