mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +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:
@@ -354,7 +354,7 @@ int w_compress(lua_State *L)
|
||||
if (fstr && !Compressor::getConstant(fstr, format))
|
||||
return luaL_error(L, "Invalid compressed data format: %s", fstr);
|
||||
|
||||
int level = (int) luaL_optnumber(L, 3, -1);
|
||||
int level = (int) luaL_optinteger(L, 3, -1);
|
||||
|
||||
CompressedData *cdata = nullptr;
|
||||
if (lua_isstring(L, 1))
|
||||
|
||||
Reference in New Issue
Block a user