mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-24 07:06:36 +00:00
Fix a bug where getting a high score in a read-only house and then opening an editable house would cause the editable house to be overwritten
This commit is contained in:
@@ -715,6 +715,8 @@ Boolean WriteScoresToDisk (void)
|
|||||||
|
|
||||||
scoresStream->Close();
|
scoresStream->Close();
|
||||||
|
|
||||||
|
gameDirty = false;
|
||||||
|
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -615,20 +615,6 @@ Boolean ReadHouse (void)
|
|||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gameDirty || fileDirty)
|
|
||||||
{
|
|
||||||
if (houseIsReadOnly)
|
|
||||||
{
|
|
||||||
if (!WriteScoresToDisk())
|
|
||||||
{
|
|
||||||
YellowAlert(kYellowFailedWrite, 0);
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!WriteHouse(false))
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
byteCount = houseStream->Size();
|
byteCount = houseStream->Size();
|
||||||
|
|
||||||
#ifdef COMPILEDEMO
|
#ifdef COMPILEDEMO
|
||||||
|
Reference in New Issue
Block a user