snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit bec483653384e22c989f6a08921a5617284e5e7e
parent 3318f1596bbb2853a8305194204084b32790fbd7
Author: default <nobody@localhost>
Date:   Wed,  5 Feb 2025 11:04:28 +0100

Fixed JSON string parsing.

Diffstat:
Mxs_json.h | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/xs_json.h b/xs_json.h @@ -280,6 +280,12 @@ static xs_val *_xs_json_load_lexer(FILE *f, js_type *t) else { char cc = c; v = xs_insert_m(v, offset, &cc, 1); + + if (!xs_is_string(v)) { + *t = JS_ERROR; + break; + } + offset++; } }