Commit 3e62d7c3 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo
Browse files

Merge pull request #1244 from yihuang/2.8

fix lua_cmsgpack pack map as array
parents a57294b3 706056ca
...@@ -374,7 +374,7 @@ static int table_is_an_array(lua_State *L) { ...@@ -374,7 +374,7 @@ static int table_is_an_array(lua_State *L) {
while(lua_next(L,-2)) { while(lua_next(L,-2)) {
/* Stack: ... key value */ /* Stack: ... key value */
lua_pop(L,1); /* Stack: ... key */ lua_pop(L,1); /* Stack: ... key */
if (!lua_isnumber(L,-1)) goto not_array; if (lua_type(L,-1) != LUA_TNUMBER) goto not_array;
n = lua_tonumber(L,-1); n = lua_tonumber(L,-1);
idx = n; idx = n;
if (idx != n || idx < 1) goto not_array; if (idx != n || idx < 1) goto not_array;
......
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