diff options
Diffstat (limited to 'src/mpack/lmpack.c')
-rw-r--r-- | src/mpack/lmpack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mpack/lmpack.c b/src/mpack/lmpack.c index 957bac37cc..3c7108a337 100644 --- a/src/mpack/lmpack.c +++ b/src/mpack/lmpack.c @@ -233,7 +233,7 @@ static mpack_uint32_t lmpack_objlen(lua_State *L, int *is_array) while (lua_next(L, -2)) { lua_pop(L, 1); /* pop value */ isarr = isarr - && lua_isnumber(L, -1) /* lua number */ + && lua_type(L, -1) == LUA_TNUMBER /* lua number */ && (n = lua_tonumber(L, -1)) > 0 /* greater than 0 */ && (size_t)n == n; /* and integer */ max = isarr && (size_t)n > max ? (size_t)n : max; |