aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-10-24 15:33:25 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-10-24 15:33:25 -0300
commit25a2dac2bcab84d1f1ce8c49b673b4a032a29a4a (patch)
treeeba12d537560a58565ea14a70c8dae172be6f292 /ltests.c
parente3ce88c9e850b7e79751083014699c5eae1bff31 (diff)
downloadlua-25a2dac2bcab84d1f1ce8c49b673b4a032a29a4a.tar.gz
lua-25a2dac2bcab84d1f1ce8c49b673b4a032a29a4a.tar.bz2
lua-25a2dac2bcab84d1f1ce8c49b673b4a032a29a4a.zip
Always use unsigned int for indexing table-arrays
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index 3534d8d5..2dafbee5 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1043,7 +1043,7 @@ static int table_query (lua_State *L) {
1043 } 1043 }
1044 else if (cast_uint(i) < asize) { 1044 else if (cast_uint(i) < asize) {
1045 lua_pushinteger(L, i); 1045 lua_pushinteger(L, i);
1046 arr2obj(t, i, s2v(L->top.p)); 1046 arr2obj(t, cast_uint(i), s2v(L->top.p));
1047 api_incr_top(L); 1047 api_incr_top(L);
1048 lua_pushnil(L); 1048 lua_pushnil(L);
1049 } 1049 }