aboutsummaryrefslogtreecommitdiff
path: root/lua_cjson.c
diff options
context:
space:
mode:
Diffstat (limited to 'lua_cjson.c')
-rw-r--r--lua_cjson.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lua_cjson.c b/lua_cjson.c
index 4a2ce0f..b64ed62 100644
--- a/lua_cjson.c
+++ b/lua_cjson.c
@@ -1034,7 +1034,7 @@ static void json_next_number_token(json_parse_t *json, json_token_t *token)
1034 */ 1034 */
1035static void json_next_token(json_parse_t *json, json_token_t *token) 1035static void json_next_token(json_parse_t *json, json_token_t *token)
1036{ 1036{
1037 json_token_type_t *ch2token = json->cfg->ch2token; 1037 const json_token_type_t *ch2token = json->cfg->ch2token;
1038 int ch; 1038 int ch;
1039 1039
1040 /* Eat whitespace. */ 1040 /* Eat whitespace. */
@@ -1149,7 +1149,8 @@ static void json_decode_descend(lua_State *l, json_parse_t *json, int slots)
1149 } 1149 }
1150 1150
1151 strbuf_free(json->tmp); 1151 strbuf_free(json->tmp);
1152 luaL_error(l, "Too many nested data structures"); 1152 luaL_error(l, "Found too many nested data structures (%d) at character %d",
1153 json->current_depth, json->ptr - json->data);
1153} 1154}
1154 1155
1155static void json_parse_object_context(lua_State *l, json_parse_t *json) 1156static void json_parse_object_context(lua_State *l, json_parse_t *json)