[Scummvm-git-logs] scummvm master -> f2829350ce7c488ae1e3c14201a5bd177f198b46

bluegr noreply at scummvm.org
Tue Sep 17 05:32:47 UTC 2024


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:
f2829350ce MYST3: Fix incorrectly constructed sanity check


Commit: f2829350ce7c488ae1e3c14201a5bd177f198b46
    https://github.com/scummvm/scummvm/commit/f2829350ce7c488ae1e3c14201a5bd177f198b46
Author: macca8 (brubask6 at yahoo.com)
Date: 2024-09-17T08:32:44+03:00

Commit Message:
MYST3: Fix incorrectly constructed sanity check

Changed paths:
    engines/myst3/myst3.cpp


diff --git a/engines/myst3/myst3.cpp b/engines/myst3/myst3.cpp
index 60d2f3073b8..de2f27dc870 100644
--- a/engines/myst3/myst3.cpp
+++ b/engines/myst3/myst3.cpp
@@ -1517,7 +1517,8 @@ Common::Error Myst3Engine::loadGameState(int slot) {
 	// Slots are assigned consecutively, starting from slot 1
 	// Get the Save List index for the selected slot
 	int listIndex = (slot == 0) ? slot : slot - 1;
-	if (!listIndex < filenames.size()) {
+	// Sanity check
+	if (listIndex >= filenames.size()) {
 		return Common::kReadingFailed;
 	}
 




More information about the Scummvm-git-logs mailing list