[Scummvm-git-logs] scummvm master -> 02164ebd54f7deed282be1f92eaf1efff5000e3c

tag2015 noreply at scummvm.org
Thu Feb 2 14:29:36 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
02164ebd54 HUGO: Fix wrong check for error in save/load


Commit: 02164ebd54f7deed282be1f92eaf1efff5000e3c
    https://github.com/scummvm/scummvm/commit/02164ebd54f7deed282be1f92eaf1efff5000e3c
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-02-02T14:59:08+01:00

Commit Message:
HUGO: Fix wrong check for error in save/load

On succesful save saveGame returns true, not zero.
This caused the autosave to erroneusly report save failures repeatedly

Changed paths:
    engines/hugo/hugo.cpp


diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index d56a2789b43..cd425194ace 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -165,11 +165,11 @@ void HugoEngine::setMaxScore(const int newScore) {
 }
 
 Common::Error HugoEngine::saveGameState(int slot, const Common::String &desc, bool isAutosave) {
-	return (_file->saveGame(slot, desc) ? Common::kWritingFailed : Common::kNoError);
+	return (_file->saveGame(slot, desc) ? Common::kNoError : Common::kWritingFailed);
 }
 
 Common::Error HugoEngine::loadGameState(int slot) {
-	return (_file->restoreGame(slot) ? Common::kReadingFailed : Common::kNoError);
+	return (_file->restoreGame(slot) ? Common::kNoError : Common::kReadingFailed);
 }
 
 bool HugoEngine::hasFeature(EngineFeature f) const {




More information about the Scummvm-git-logs mailing list