check() does not currently support negative offsets; it'll give a confusing

error message
This commit is contained in:
Glenn Maynard
2005-07-05 03:16:10 +00:00
parent 1607e6320a
commit e8f9f382db
+2
View File
@@ -22,6 +22,8 @@ void CreateMethodsTable( lua_State *L, const CString &szName )
*/
bool CheckLuaObjectType( lua_State *L, int narg, const char *szType )
{
ASSERT_M( narg > 0, ssprintf("%i", narg) ); // negative offsets not supported
int iTop = lua_gettop(L);
lua_pushvalue( L, narg );