diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-10-24 15:33:25 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-10-24 15:33:25 -0300 |
commit | 25a2dac2bcab84d1f1ce8c49b673b4a032a29a4a (patch) | |
tree | eba12d537560a58565ea14a70c8dae172be6f292 /ltests.c | |
parent | e3ce88c9e850b7e79751083014699c5eae1bff31 (diff) | |
download | lua-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 | } |