Use luaL_check/optinteger instead of luaL_check/optnumber when getting integer arguments to functions. Resolves issue #1251.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-07-16 12:17:50 -03:00
parent abcade9421
commit 34ebe18f14
30 changed files with 127 additions and 127 deletions
+2 -2
View File
@@ -47,8 +47,8 @@ int w_World_update(lua_State *L)
luax_catchexcept(L, [&](){ t->update(dt); });
else
{
int velocityiterations = (int) luaL_checknumber(L, 3);
int positioniterations = (int) luaL_checknumber(L, 4);
int velocityiterations = (int) luaL_checkinteger(L, 3);
int positioniterations = (int) luaL_checkinteger(L, 4);
luax_catchexcept(L, [&](){ t->update(dt, velocityiterations, positioniterations); });
}