From f22ec944d46ffc54b59f61ea4954dcfe04475c9e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 28 Sep 2004 10:03:49 +0000 Subject: [PATCH] hack to fix metrics that start with + --- stepmania/src/ThemeManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 1fa85d2656..be7aa61b30 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -618,6 +618,11 @@ float ThemeManager::GetMetricF( CString sClassName, CString sValueName ) // HACK: Many metrics have "//" comments that Lua fails to parse. // Replace them with Lua-style comments. str.Replace( "//", "--" ); + + // Remove leading +, eg. "+50"; Lua doesn't handle that. + if( str.size() >= 1 && str[0] == '+' ) + str.erase( 0, 1 ); + return Lua::RunExpressionF( str ); }