[Scummvm-git-logs] scummvm branch-2-7 -> 36d0dd3a5ded0c73e77fc61f2641027a75c0770c
tag2015
noreply at scummvm.org
Thu Feb 2 20:27:29 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:
36d0dd3a5d HUGO: Fix wrong check for error in save/load
Commit: 36d0dd3a5ded0c73e77fc61f2641027a75c0770c
https://github.com/scummvm/scummvm/commit/36d0dd3a5ded0c73e77fc61f2641027a75c0770c
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-02-02T21:25:36+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