Check that there is actually an argument at that position before attempting to do something with it.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
int CheckEnum( lua_State *L, LuaReference &table, int iPos, int iInvalid, const char *szType, bool bAllowInvalid )
|
||||
{
|
||||
luaL_checkany( L, iPos );
|
||||
|
||||
if( lua_isnil(L, iPos) )
|
||||
{
|
||||
if( bAllowInvalid )
|
||||
|
||||
Reference in New Issue
Block a user