quiet windows x86 warnings

nhlua.c(628): warning C4244: 'function': conversion from 'lua_Integer' to 'int', possible loss of data
nhlua.c(644): warning C4244: 'function': conversion from 'lua_Integer' to 'int', possible loss of data
nhlua.c(646): warning C4244: 'function': conversion from 'lua_Integer' to 'int', possible loss of data
This commit is contained in:
nhmall
2020-04-01 12:58:36 -04:00
parent 62538f8e62
commit 3bfb5a6c35

View File

@@ -625,7 +625,7 @@ lua_State *L;
int argc = lua_gettop(L);
if (argc == 1)
lua_pushinteger(L, rn2(luaL_checkinteger(L, 1)));
lua_pushinteger(L, rn2((int) luaL_checkinteger(L, 1)));
else
nhl_error(L, "Wrong args");
@@ -641,9 +641,9 @@ lua_State *L;
int argc = lua_gettop(L);
if (argc == 1)
lua_pushinteger(L, rn2(luaL_checkinteger(L, 1)));
lua_pushinteger(L, rn2((int) luaL_checkinteger(L, 1)));
else if (argc == 2)
lua_pushinteger(L, luaL_checkinteger(L, 1) + rn2(luaL_checkinteger(L, 2)));
lua_pushinteger(L, luaL_checkinteger(L, 1) + rn2((int) luaL_checkinteger(L, 2)));
else
nhl_error(L, "Wrong args");