diff --git a/stepmania/src/ActorCommands.cpp b/stepmania/src/ActorCommands.cpp index 2670efe72d..6826c696d4 100644 --- a/stepmania/src/ActorCommands.cpp +++ b/stepmania/src/ActorCommands.cpp @@ -8,7 +8,7 @@ ActorCommands::ActorCommands( const CString &sCommands ) { - if( sCommands.Left(1) == "%" ) + if( sCommands.size() > 0 && sCommands[0] == '%' ) { m_sLuaFunction = sCommands; m_sLuaFunction.erase( m_sLuaFunction.begin() ); diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 92b5e8fa58..a6ef39a929 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -685,7 +685,8 @@ CString ThemeManager::GetMetric( const CString &sClassName, const CString &sValu void ThemeManager::EvaluateString( CString &sText ) { - /* If the string begins with an @, treat it as a Lua expression. + /* If the string begins with an @, then this is a Lua expression + * that should be evaluated immediately. * Still do font aliases on the resulting string. */ LuaHelpers::RunAtExpressionS( sText );