From 44bd9f758221e1883d0bd9e025c959946502f22e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 7 Oct 2006 07:42:25 +0000 Subject: [PATCH] fix stack imbalance --- stepmania/src/EnumHelper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stepmania/src/EnumHelper.cpp b/stepmania/src/EnumHelper.cpp index 01e991c53f..99106d5f0a 100644 --- a/stepmania/src/EnumHelper.cpp +++ b/stepmania/src/EnumHelper.cpp @@ -105,6 +105,7 @@ static void PushEnumMethodTable( lua_State *L ) luaL_register( L, "Enum", EnumLib ); } +/* Set up the enum table on the stack, and pop the table. */ void Enum::SetMetatable( lua_State *L, LuaReference &EnumTable, LuaReference &EnumIndexTable, const char *szName ) { EnumTable.PushSelf( L ); @@ -124,7 +125,7 @@ void Enum::SetMetatable( lua_State *L, LuaReference &EnumTable, LuaReference &En lua_setfield( L, -2, "__type" ); // for luaL_pushtype } lua_setmetatable( L, -2 ); - lua_pop( L, 1 ); + lua_pop( L, 2 ); } /*