summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryihuang <yi.codeplayer@gmail.com>2013-08-13 17:47:42 +0800
committeryihuang <yi.codeplayer@gmail.com>2013-08-13 17:48:40 +0800
commit706056ca166d6d8ca80d4a05edd17fb354b67cb7 (patch)
tree533d2acea25d143bc473e2c44f9e2a1d7700be7e
parent14a1cba3e3d208e64400193d42641ba10daa2719 (diff)
downloadredis-706056ca166d6d8ca80d4a05edd17fb354b67cb7.tar.gz
fix lua_cmsgpack pack map as array
-rw-r--r--deps/lua/src/lua_cmsgpack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/lua/src/lua_cmsgpack.c b/deps/lua/src/lua_cmsgpack.c
index 906121361..53dc1cf61 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;