We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8692d79 commit 351d38eCopy full SHA for 351d38e
lua_cmsgpack.c
@@ -431,7 +431,7 @@ static int table_is_an_array(lua_State *L) {
431
lua_pop(L,1); /* Stack: ... key */
432
/* The <= 0 check is valid here because we're comparing indexes. */
433
#if LUA_VERSION_NUM < 503
434
- if (!lua_isnumber(L,-1) || (n = lua_tonumber(L, -1)) <= 0 ||
+ if ((LUA_TNUMBER != lua_type(L,-1)) || (n = lua_tonumber(L, -1)) <= 0 ||
435
!IS_INT_EQUIVALENT(n)) {
436
#else
437
if (!lua_isinteger(L,-1) || (n = lua_tointeger(L, -1)) <= 0) {
0 commit comments