mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +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();
|
||||
|
||||
gameDirty = false;
|
||||
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
@@ -614,20 +614,6 @@ Boolean ReadHouse (void)
|
||||
YellowAlert(kYellowUnaccounted, 2);
|
||||
return (false);
|
||||
}
|
||||
|
||||
if (gameDirty || fileDirty)
|
||||
{
|
||||
if (houseIsReadOnly)
|
||||
{
|
||||
if (!WriteScoresToDisk())
|
||||
{
|
||||
YellowAlert(kYellowFailedWrite, 0);
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
else if (!WriteHouse(false))
|
||||
return(false);
|
||||
}
|
||||
|
||||
byteCount = houseStream->Size();
|
||||
|
||||
|
Reference in New Issue
Block a user