1
0
mirror of https://github.com/lxsang/antd-lua-plugin synced 2024-12-26 01:18:22 +01:00

fix json parse bug

This commit is contained in:
lxsang 2020-12-18 23:02:47 +01:00
parent f176ddddac
commit 68c9177508
2 changed files with 1 additions and 0 deletions

BIN
dist/lua-0.5.2b.tar.gz vendored

Binary file not shown.

View File

@ -245,6 +245,7 @@ static int l_json_parser(lua_State *L, const char* s)
int r = jsmn_parse(&p, s, strlen(s), t, sizeof(t)/sizeof(t[0]));
if (r < 0) {
LOG("Failed to parse JSON: %d\n", r);
lua_pushnil(L);
return 0;
}
token_to_object(L,t,s,0);