This commit is contained in:
Glenn Maynard
2003-03-19 21:41:53 +00:00
parent c950a7327d
commit 84d29070e4
+2 -2
View File
@@ -44,7 +44,7 @@ bool LyricsLoader::LoadFromLRCFile( CString sPath, Song &out )
if( 0==stricmp(sValueName,"COLOUR") || 0==stricmp(sValueName,"COLOR") ) if( 0==stricmp(sValueName,"COLOUR") || 0==stricmp(sValueName,"COLOR") )
{ {
// set color var here for this segment // 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 ); int result = sscanf( sValueData.GetString(), "0x%2x%2x%2x", &r, &g, &b );
if(result != 3) if(result != 3)
{ {
@@ -53,7 +53,7 @@ bool LyricsLoader::LoadFromLRCFile( CString sPath, Song &out )
continue; continue;
} }
m_LastFoundColor = RageColor(r,g,b,1); m_LastFoundColor = RageColor(r / 256.0f, g / 256.0f, b / 256.0f, 1);
continue; continue;
} }