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:
@@ -471,7 +471,7 @@ int w_getDistance(lua_State *L)
|
||||
|
||||
int w_setMeter(lua_State *L)
|
||||
{
|
||||
int arg1 = (int) luaL_checknumber(L, 1);
|
||||
float arg1 = (float) luaL_checknumber(L, 1);
|
||||
luax_catchexcept(L, [&](){ Physics::setMeter(arg1); });
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user