Fix getting base class.

This commit is contained in:
Steve Checkoway
2007-04-08 00:26:52 +00:00
parent 676ca0fb6e
commit 7487b2c933
+7 -7
View File
@@ -538,14 +538,14 @@ XNode *LuaHelpers::GetLuaInformation()
lua_pop( L, 1 ); // pop name lua_pop( L, 1 ); // pop name
// Get base class. // Get base class.
if( luaL_getmetafield( L, -1, "base" ) ) luaL_getmetatable( L, name );
{ ASSERT( !lua_isnil(L, -1) );
name = lua_tostring( L, -1 ); lua_getfield( L, -1, "base" );
name = lua_tostring( L, -1 );
if( name ) if( name )
c.m_sBaseName = name; c.m_sBaseName = name;
lua_pop( L, 1 ); // pop name lua_pop( L, 2 ); // pop name and metatable
}
// Get methods. // Get methods.
FOREACH_LUATABLE( L, -1 ) FOREACH_LUATABLE( L, -1 )