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
+1 -1
View File
@@ -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))