Cannot pass nonPOD through ..., will abort at runtime. (Why gcc doesn't just make this an error, I'll never know.)

This commit is contained in:
Steve Checkoway
2006-10-21 08:59:00 +00:00
parent 89f60be8bf
commit 6a4e58a8fd
+2 -2
View File
@@ -363,8 +363,8 @@ bool SMLoader::LoadFromSMFile( const RString &sPath, Song &out )
else if( sValueName.Left(strlen("BGCHANGES"))=="BGCHANGES" || sValueName=="ANIMATIONS" )
{
BackgroundLayer iLayer = BACKGROUND_LAYER_1;
if( sscanf(sValueName, "BGCHANGES%d", ConvertValue<int>(&iLayer)) == 1 )
iLayer = (BackgroundLayer)(iLayer-1); // #BGCHANGES2 = BACKGROUND_LAYER_2
if( sscanf(sValueName, "BGCHANGES%d", &*ConvertValue<int>(&iLayer)) == 1 )
enum_add(iLayer, -1); // #BGCHANGES2 = BACKGROUND_LAYER_2
bool bValid = iLayer>=0 && iLayer<NUM_BackgroundLayer;
if( !bValid )