From 0f7a5c873de2e4e5c0f4c84c4027683bb2a2ed87 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 6 Nov 2004 06:54:04 +0000 Subject: [PATCH] absolute coordinate check: constants with no offset are ok --- stepmania/src/Actor.cpp | 2 +- stepmania/src/ThemeManager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index b61f9aa5fc..1ea626d18c 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -634,7 +634,7 @@ void Actor::HandleCommand( const ParsedCommand &command ) #if defined(DEBUG) if( sName == "x" || sName == "y" ) // an absolute X or Y position { - if( sParam(1).Find('-') == -1 && sParam(1).Find('+') == -1 ) + if( isdigit(sParam(1)[0]) && sParam(1).Find('-') == -1 && sParam(1).Find('+') == -1 ) { LOG->Warn( "Command '%s' should contain a SCREEN_* constant", command.GetOriginalCommandString().c_str() ); } diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 343a550987..4fde5ff465 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -624,7 +624,7 @@ float ThemeManager::GetMetricF( const CString &sClassName, const CString &sValue #if defined(DEBUG) if( sValueName.Right(1) == "X" || sValueName.Right(1) == "Y" ) // an absolute X or Y position { - if( sValue.Find('-') == -1 && sValue.Find('+') == -1 ) + if( isdigit(sValue[0]) && sValue.Find('-') == -1 && sValue.Find('+') == -1 ) { LOG->Warn( "Absolute position metric '%s'-'%s' should contain a SCREEN_* constant", sClassName.c_str(), sValueName.c_str() ); }