Always use unsigned int for indexing table-arrays

This commit is contained in:
Roberto Ierusalimschy
2024-10-24 15:33:25 -03:00
parent e3ce88c9e8
commit 25a2dac2bc
2 changed files with 5 additions and 5 deletions

View File

@@ -1043,7 +1043,7 @@ static int table_query (lua_State *L) {
}
else if (cast_uint(i) < asize) {
lua_pushinteger(L, i);
arr2obj(t, i, s2v(L->top.p));
arr2obj(t, cast_uint(i), s2v(L->top.p));
api_incr_top(L);
lua_pushnil(L);
}