From 22bb79562a0f876c96d78f913a9ad221698354e6 Mon Sep 17 00:00:00 2001 From: ame Date: Sat, 30 Dec 2023 14:38:05 -0600 Subject: json fixes --- src/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/io.c') diff --git a/src/io.c b/src/io.c index 8250ad1..27d85cc 100644 --- a/src/io.c +++ b/src/io.c @@ -110,7 +110,7 @@ void i_pprint(lua_State* L, int indent, int skip_indent){ for(;lua_next(L,last_idx) != 0;){ if(lua_type(L,-2) == LUA_TSTRING){ if(!skip) print_indentation(indent); - printf(" %s"color_gray": "color_reset, lua_tostring(L,-2)); + printf(" '%s'"color_gray": "color_reset, lua_tostring(L,-2)); } i_pprint(L,indent+1,1); printf(","); @@ -192,7 +192,7 @@ void json_parse(lua_State* L, str* raw){ int i = 1; for(i = 1; i != raw->len - 1; i++){ topush[0] = *(raw->c + i); - if(state == normal && (topush[0] == ' ' || topush[0] == '\n')) continue; + if(state == normal && (topush[0] == ' ' || topush[0] == '\n' || topush[0] <= 10)) continue; switch(topush[0]){ case '"': -- cgit v1.2.3