Commit f9206db3 authored by Marek Vavrusa's avatar Marek Vavrusa

daemon/engine: fixed json pack for str-encoded int

string encoded integers are treated as possible
numbers, so a more strict typecheck is needed
parent e7444491
......@@ -291,7 +291,7 @@ static JsonNode *l_pack_elem(lua_State *L, int top)
while(lua_next(L, top) != 0) {
bool is_array = false;
if (!node) {
is_array = lua_isnumber(L, top + 1);
is_array = (lua_type(L, top + 1) == LUA_TNUMBER);
node = is_array ? json_mkarray() : json_mkobject();
if (!node) {
return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment