Skip to content

Commit

Permalink
fix lua_cmsgpack pack map as array
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang authored and antirez committed Aug 27, 2013
1 parent e29e426 commit 9bb91d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deps/lua/src/lua_cmsgpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9bb91d1

Please sign in to comment.