From 2c6e28f46d10ec39e5cfafbe4981b6dfcd79fdf0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 15 Jan 2006 00:04:51 +0000 Subject: [PATCH] fix stack imbalances --- stepmania/src/LuaBinding.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stepmania/src/LuaBinding.cpp b/stepmania/src/LuaBinding.cpp index babc0e84ce..c406034358 100644 --- a/stepmania/src/LuaBinding.cpp +++ b/stepmania/src/LuaBinding.cpp @@ -243,7 +243,7 @@ void LuaClass::BeforeReset() lua_rawget( L, LUA_REGISTRYINDEX ); ASSERT( !lua_isnil(L, -1) ); m_sClassName = lua_tostring( L, -1 ); - lua_pop( L, 1 ); + lua_pop( L, 2 ); LUA->Release( L ); } @@ -257,6 +257,7 @@ void LuaClass::Register() Lua *L = LUA->Get(); this->PushSelf(L); LuaBinding::ApplyDerivedType( L, m_sClassName, m_pSelf ); + lua_pop( L, 1 ); LUA->Release( L ); /* To conserve memory, clear the class name. We only need it while restoring. */