From f8c1675309803d8cda734f4a1c2e0bb9820a43cc Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 22 Sep 2006 04:56:35 +0000 Subject: [PATCH] allocate later don't set name for binary chunks --- stepmania/src/ActorUtil.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index edd7e3f3ad..25dc331f38 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -478,8 +478,6 @@ apActorCommands ActorUtil::ParseActorCommands( const RString &sCommands ) Lua *L = LUA->Get(); - LuaReference *pRet = new LuaReference; - RString sError; if( !LuaHelpers::RunScript( L, sLuaFunction, "", sError, 1 ) ) { @@ -487,12 +485,14 @@ apActorCommands ActorUtil::ParseActorCommands( const RString &sCommands ) } /* The function is now on the stack. */ + LuaReference *pRet = new LuaReference; pRet->SetFromStack( L ); LUA->Release( L ); ASSERT_M( !pRet->IsNil(), sLuaFunction.c_str() ); - pRet->SetName( sLuaFunction ); + if( sCommands.size() > 0 && sCommands[0] != '\033' ) // not a binary chunk + pRet->SetName( sLuaFunction ); return apActorCommands( pRet ); }