mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +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:
@@ -84,7 +84,7 @@ int w_newQueueableSource(lua_State *L)
|
||||
Source *t = nullptr;
|
||||
|
||||
luax_catchexcept(L, [&]() {
|
||||
t = instance()->newSource((int)luaL_checknumber(L, 1), (int)luaL_checknumber(L, 2), (int)luaL_checknumber(L, 3), (int)luaL_optnumber(L, 4, 0));
|
||||
t = instance()->newSource((int)luaL_checkinteger(L, 1), (int)luaL_checkinteger(L, 2), (int)luaL_checkinteger(L, 3), (int)luaL_optinteger(L, 4, 0));
|
||||
});
|
||||
|
||||
if (t != nullptr)
|
||||
|
||||
Reference in New Issue
Block a user