diff options
| author | default <nobody@localhost> | 2025-02-05 11:04:28 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2025-02-05 11:04:28 +0100 |
| commit | bec483653384e22c989f6a08921a5617284e5e7e (patch) | |
| tree | fc413ca4a96a69422e28c0ab74f5d69828aa6969 | |
| parent | 3318f1596bbb2853a8305194204084b32790fbd7 (diff) | |
Fixed JSON string parsing.
| -rw-r--r-- | xs_json.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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++; } } |