From 3bfb5a6c35df955d66712cfc9f2e50febff91864 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 1 Apr 2020 12:58:36 -0400 Subject: [PATCH] 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 --- src/nhlua.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nhlua.c b/src/nhlua.c index 0e5fb08de..a8ec32edb 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -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"); -- 2.50.1