[Scummvm-git-logs] scummvm master -> a3eeebb4d40e176e7f8302c89f2d4065228c79d9
peterkohaut
peterkohaut at users.noreply.github.com
Thu May 30 23:28:15 CEST 2019
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:
a3eeebb4d4 BLADERUNNER: Fix invalid rect in ESPER zoom
Commit: a3eeebb4d40e176e7f8302c89f2d4065228c79d9
https://github.com/scummvm/scummvm/commit/a3eeebb4d40e176e7f8302c89f2d4065228c79d9
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-05-30T23:27:34+02:00
Commit Message:
BLADERUNNER: Fix invalid rect in ESPER zoom
In some cornenr case when photo selection is ajdusted the final
rectangle might end up invalid and assert will occur.
This fixes this issue by correctly setting rect dimensions.
Changed paths:
engines/bladerunner/ui/esper.cpp
diff --git a/engines/bladerunner/ui/esper.cpp b/engines/bladerunner/ui/esper.cpp
index de41a19..fd94977 100644
--- a/engines/bladerunner/ui/esper.cpp
+++ b/engines/bladerunner/ui/esper.cpp
@@ -1765,6 +1765,14 @@ void ESPER::updateSelection() {
}
}
+ if (left > right) {
+ SWAP(left, right);
+ }
+
+ if (top > bottom) {
+ SWAP(top, bottom);
+ }
+
_regionSelected = findRegion(Common::Rect(left, top, right, bottom));
if (_regionSelected >= 0) {
_regionSelectedAck = true;
More information about the Scummvm-git-logs
mailing list