Browse Source

Fixed crash in JSON parser.

grunfink 5 months ago
parent
commit
2c91041cd1
1 changed files with 4 additions and 0 deletions
  1. 4 0
      xs_json.h

+ 4 - 0
xs_json.h

@@ -282,6 +282,10 @@ static xs_val *_xs_json_load_lexer(FILE *f, js_type *t)
                         cp += 0x2400;
 
                     break;
+
+                default:
+                    *t = JS_ERROR;
+                    break;
                 }
 
                 v = xs_utf8_insert(v, cp, &offset);