mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
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:
@@ -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); });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user