mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Fix many warnings about implicit integer conversions when compiling for 64 bits.
--HG-- branch : minor
This commit is contained in:
@@ -330,19 +330,22 @@ int luax_table_insert(lua_State *L, int tindex, int vindex, int pos)
|
||||
tindex = lua_gettop(L)+1+tindex;
|
||||
if (vindex < 0)
|
||||
vindex = lua_gettop(L)+1+vindex;
|
||||
|
||||
if (pos == -1)
|
||||
{
|
||||
lua_pushvalue(L, vindex);
|
||||
lua_rawseti(L, tindex, lua_objlen(L, tindex)+1);
|
||||
lua_rawseti(L, tindex, (int) lua_objlen(L, tindex)+1);
|
||||
return 0;
|
||||
}
|
||||
else if (pos < 0)
|
||||
pos = lua_objlen(L, tindex)+1+pos;
|
||||
for (int i = lua_objlen(L, tindex)+1; i > pos; i--)
|
||||
pos = (int) lua_objlen(L, tindex)+1+pos;
|
||||
|
||||
for (int i = (int) lua_objlen(L, tindex)+1; i > pos; i--)
|
||||
{
|
||||
lua_rawgeti(L, tindex, i-1);
|
||||
lua_rawseti(L, tindex, i);
|
||||
}
|
||||
|
||||
lua_pushvalue(L, vindex);
|
||||
lua_rawseti(L, tindex, pos);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user