From 84d29070e48a03a04191047889bb8d149e0c193c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 19 Mar 2003 21:41:53 +0000 Subject: [PATCH] fixup --- stepmania/src/LyricsLoader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stepmania/src/LyricsLoader.cpp b/stepmania/src/LyricsLoader.cpp index f32f86e890..c8893a358a 100644 --- a/stepmania/src/LyricsLoader.cpp +++ b/stepmania/src/LyricsLoader.cpp @@ -44,16 +44,16 @@ bool LyricsLoader::LoadFromLRCFile( CString sPath, Song &out ) if( 0==stricmp(sValueName,"COLOUR") || 0==stricmp(sValueName,"COLOR") ) { // set color var here for this segment - float r=1,b=1,g=1; // initialize in case sscanf fails + int r, g, b; int result = sscanf( sValueData.GetString(), "0x%2x%2x%2x", &r, &g, &b ); if(result != 3) { LOG->Trace( "The color value '%s' in '%s' is invalid.", - sValueData.GetString(), sPath.GetString() ); + sValueData.GetString(), sPath.GetString() ); continue; } - m_LastFoundColor = RageColor(r,g,b,1); + m_LastFoundColor = RageColor(r / 256.0f, g / 256.0f, b / 256.0f, 1); continue; }