From 9bb91d198cd6130efbdde7406b3f603cc5d0c648 Mon Sep 17 00:00:00 2001 From: yihuang Date: Tue, 13 Aug 2013 17:47:42 +0800 Subject: [PATCH] fix lua_cmsgpack pack map as array --- deps/lua/src/lua_cmsgpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/lua/src/lua_cmsgpack.c b/deps/lua/src/lua_cmsgpack.c index 90612136169..53dc1cf61f0 100644 --- a/deps/lua/src/lua_cmsgpack.c +++ b/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;