Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix lua_cmsgpack pack map as array

  • Loading branch information...
commit 9bb91d198cd6130efbdde7406b3f603cc5d0c648 1 parent e29e426
@yihuang yihuang authored committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  deps/lua/src/lua_cmsgpack.c
View
2  deps/lua/src/lua_cmsgpack.c
@@ -374,7 +374,7 @@ static int table_is_an_array(lua_State *L) {
while(lua_next(L,-2)) {
/* Stack: ... key value */
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);
idx = n;
if (idx != n || idx < 1) goto not_array;
Please sign in to comment.
Something went wrong with that request. Please try again.