mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix table.maxn().
This commit is contained in:
parent
a720db409d
commit
b90d80d80a
@ -82,7 +82,7 @@ LJLIB_CF(table_maxn)
|
||||
}
|
||||
node = noderef(t->node);
|
||||
for (i = (ptrdiff_t)t->hmask; i >= 0; i--)
|
||||
if (tvisnumber(&node[i].key)) {
|
||||
if (!tvisnil(&node[i].val) && tvisnumber(&node[i].key)) {
|
||||
lua_Number n = numberVnum(&node[i].key);
|
||||
if (n > m) m = n;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user