[Scummvm-git-logs] scummvm master -> a38bbc7c3e9e6fef9db01768087e6a3095e47e3c
bluegr
noreply at scummvm.org
Sat Jul 13 14:58:19 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:
a38bbc7c3e TUCKER: Fix bottom exit for UpperCorridor
Commit: a38bbc7c3e9e6fef9db01768087e6a3095e47e3c
https://github.com/scummvm/scummvm/commit/a38bbc7c3e9e6fef9db01768087e6a3095e47e3c
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-07-13T17:58:16+03:00
Commit Message:
TUCKER: Fix bottom exit for UpperCorridor
This is a fix for tracker issue #15264
The cause seems to have been that a method was trying to access unallocated space.
Changed paths:
engines/tucker/tucker.cpp
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index 84a93df8bef..152effc5032 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -3064,10 +3064,21 @@ bool TuckerEngine::testLocationMask(int x, int y) {
if (_locationMaskType > 0 || _locationMaskIgnore) {
return true;
}
- if (_location == kLocationSubwayTunnel || _location == kLocationKitchen) {
+
+ if (_location == kLocationSubwayTunnel
+ || _location == kLocationKitchen
+ || (_location == kLocationTopCorridor && _nextLocation == kLocationBottomCorridor)
+ ) {
y -= 3;
}
const int offset = y * 640 + x;
+ if (offset >= (640 * 140)) {
+ // NOTE This causes multiple warning printouts in the console in problematic locations such as kLocationTopCorridor.
+ // TODO If all problematic locations are accounted for and returning true is the proper thing to do for all,
+ // we could keep only the "return true" statement here and remove the warning (or change it to a high level debug).
+ warning("testLocationMask: offset (%d, %d) is out of bounds for location: %d, nextLocation: %d", x, y, _location, _nextLocation);
+ return true;
+ }
return (_locationBackgroundMaskBuf[offset] > 0);
}
More information about the Scummvm-git-logs
mailing list