From 4376c828e59f178928d9b5f2f554db3f93eef7e8 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 16 Feb 2005 01:46:29 +0000 Subject: [PATCH] fix LuaData::BeforeReset --- stepmania/src/LuaReference.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stepmania/src/LuaReference.cpp b/stepmania/src/LuaReference.cpp index 9011981b2e..9f21c80b5d 100644 --- a/stepmania/src/LuaReference.cpp +++ b/stepmania/src/LuaReference.cpp @@ -128,15 +128,16 @@ void LuaExpression::Register() void LuaData::BeforeReset() { /* Call Serialize(t), where t is our referenced object. */ - this->PushSelf( LUA->L ); - lua_pushstring( LUA->L, "Serialize" ); lua_gettable( LUA->L, LUA_GLOBALSINDEX ); if( lua_isnil(LUA->L, -1) ) FAIL_M( "Serialize() missing" ); - lua_call( LUA->L, 0, 1 ); + /* Arg 1 (t): */ + this->PushSelf( LUA->L ); + + lua_call( LUA->L, 1, 1 ); /* The return value is a string, which we store in m_sSerializedData. */ const char *pString = lua_tostring( LUA->L, -1 );