From 0551813657f04a687c63d22bd9fff7169ca12317 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 20 May 2004 19:22:57 +0000 Subject: [PATCH] fix large unlock codes (don't store ints in floats) --- stepmania/src/UnlockSystem.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stepmania/src/UnlockSystem.cpp b/stepmania/src/UnlockSystem.cpp index b08f1584b5..502061a950 100644 --- a/stepmania/src/UnlockSystem.cpp +++ b/stepmania/src/UnlockSystem.cpp @@ -305,18 +305,18 @@ bool UnlockSystem::Load() LOG->Trace("UnlockTypes line: %s", UnlockTypes[j].c_str() ); - const float val = (float) atof( readparam[1] ); - LOG->Trace("Unlock info: %s %f", unlock_type.c_str(), val); + const float fVal = (float) atof( readparam[1] ); + const int iVal = atoi( readparam[1] ); const UnlockType ut = StringToUnlockType( unlock_type ); if( ut != UNLOCK_INVALID ) - current.m_fRequired[ut] = val; + current.m_fRequired[ut] = fVal; if( unlock_type == "CODE" ) - current.m_iCode = (int) val; + current.m_iCode = iVal; if( unlock_type == "RO" ) { - current.m_iCode = (int)val; - m_RouletteCodes.insert( (int)val ); + current.m_iCode = iVal; + m_RouletteCodes.insert( iVal ); } }