瀏覽代碼

Fixed another new error in the JSON parser.

grunfink 5 月之前
父節點
當前提交
6e756b22c4
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      xs_json.h

+ 1 - 2
xs_json.h

@@ -300,14 +300,13 @@ static xs_val *_xs_json_load_lexer(FILE *f, js_type *t)
                 else {
                     char cc = c;
                     v = xs_insert_m(v, offset, &cc, 1);
+                    offset++;
                 }
 
                 if (!xs_is_string(v)) {
                     *t = JS_ERROR;
                     break;
                 }
-
-                offset++;
             }
         }