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
@@ -699,7 +699,7 @@ int w_ParticleSystem_reset(lua_State *L)
int w_ParticleSystem_emit(lua_State *L)
{
ParticleSystem *t = luax_checkparticlesystem(L, 1);
int num = (int) luaL_checknumber(L, 2);
int num = (int) luaL_checkinteger(L, 2);
t->emit(num);
return 0;
}