From 14cc4b43dfafb2854f83e32c1aaa097071b1a00a Mon Sep 17 00:00:00 2001 From: elasota Date: Thu, 21 May 2020 08:23:09 -0400 Subject: [PATCH] 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 --- GpApp/HighScores.cpp | 2 ++ GpApp/HouseIO.cpp | 14 -------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/GpApp/HighScores.cpp b/GpApp/HighScores.cpp index 907cf1f..de0a85c 100644 --- a/GpApp/HighScores.cpp +++ b/GpApp/HighScores.cpp @@ -715,6 +715,8 @@ Boolean WriteScoresToDisk (void) scoresStream->Close(); + gameDirty = false; + return (true); } diff --git a/GpApp/HouseIO.cpp b/GpApp/HouseIO.cpp index dd0120b..fd275a0 100644 --- a/GpApp/HouseIO.cpp +++ b/GpApp/HouseIO.cpp @@ -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();