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:
elasota
2020-05-21 08:23:09 -04:00
parent de342cb368
commit 14cc4b43df
2 changed files with 2 additions and 14 deletions

View File

@@ -715,6 +715,8 @@ Boolean WriteScoresToDisk (void)
scoresStream->Close();
gameDirty = false;
return (true);
}

View File

@@ -615,20 +615,6 @@ Boolean ReadHouse (void)
return (false);
}
if (gameDirty || fileDirty)
{
if (houseIsReadOnly)
{
if (!WriteScoresToDisk())
{
YellowAlert(kYellowFailedWrite, 0);
return(false);
}
}
else if (!WriteHouse(false))
return(false);
}
byteCount = houseStream->Size();
#ifdef COMPILEDEMO