Check that there is actually an argument at that position before attempting to do something with it.

This commit is contained in:
Steve Checkoway
2008-12-26 08:50:47 +00:00
parent a0d35509d3
commit 1509d09ad4
3 changed files with 4 additions and 0 deletions
+2
View File
@@ -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 )