[Scummvm-git-logs] scummvm master -> 125288c634bf55b131ec35a57c2f65e29d13fd25
mduggan
noreply at scummvm.org
Fri Mar 25 09:11:02 UTC 2022
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:
125288c634 ULTIMA8: Fix treasure frame validation again, 0 is ok.
Commit: 125288c634bf55b131ec35a57c2f65e29d13fd25
https://github.com/scummvm/scummvm/commit/125288c634bf55b131ec35a57c2f65e29d13fd25
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2022-03-25T18:10:21+09:00
Commit Message:
ULTIMA8: Fix treasure frame validation again, 0 is ok.
My previous comment and code were a bit wrong due to a copy-paste error.
Changed paths:
engines/ultima/ultima8/games/treasure_loader.cpp
diff --git a/engines/ultima/ultima8/games/treasure_loader.cpp b/engines/ultima/ultima8/games/treasure_loader.cpp
index c3acc586645..cda8ff971d4 100644
--- a/engines/ultima/ultima8/games/treasure_loader.cpp
+++ b/engines/ultima/ultima8/games/treasure_loader.cpp
@@ -104,9 +104,9 @@ bool TreasureLoader::internalParse(const Std::string &desc, TreasureInfo &ti,
warning("Failed to parse treasure frame list '%s'", val.c_str());
return false;
}
- // validate the frames are > 0 and < max frame
+ // validate the frames are < max frame (0 frame is valid)
for (unsigned int j = 0; j < ti._frames.size(); j++) {
- if (ti._frames[j] <= 0 || ti._frames[j] > 65535) {
+ if (ti._frames[j] > 65535) {
warning("Invalid treasure frame in list '%s'", val.c_str());
return false;
}
More information about the Scummvm-git-logs
mailing list