[Scummvm-git-logs] scummvm master -> 0c3c7a4b5cf6328754b7574c4d0702c616803c0c
sev-
noreply at scummvm.org
Tue Nov 29 11:48:32 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:
0c3c7a4b5c SCUMM: prevent possible issues when range is reversed
Commit: 0c3c7a4b5cf6328754b7574c4d0702c616803c0c
https://github.com/scummvm/scummvm/commit/0c3c7a4b5cf6328754b7574c4d0702c616803c0c
Author: BLooperZ (blooperz at users.noreply.github.com)
Date: 2022-11-29T12:48:27+01:00
Commit Message:
SCUMM: prevent possible issues when range is reversed
Changed paths:
engines/scumm/he/script_v100he.cpp
engines/scumm/he/script_v72he.cpp
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index 30c1156d87e..5431f84c153 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -710,14 +710,14 @@ void ScummEngine_v100he::o100_arrayOps() {
offs = (b >= c) ? 1 : -1;
tmp2 = c;
- tmp3 = c - b + 1;
+ tmp3 = ABS(c - b) + 1;
while (dim2start <= dim2end) {
tmp = dim1start;
while (tmp <= dim1end) {
writeArray(array, dim2start, tmp, tmp2);
if (--tmp3 == 0) {
tmp2 = c;
- tmp3 = c - b + 1;
+ tmp3 = ABS(c - b) + 1;
} else {
tmp2 += offs;
}
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 0c2d5394465..ae29efdcbe4 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -1174,14 +1174,14 @@ void ScummEngine_v72he::o72_arrayOps() {
offs = (b >= c) ? 1 : -1;
tmp2 = c;
- tmp3 = c - b + 1;
+ tmp3 = ABS(c - b) + 1;
while (dim2start <= dim2end) {
tmp = dim1start;
while (tmp <= dim1end) {
writeArray(array, dim2start, tmp, tmp2);
if (--tmp3 == 0) {
tmp2 = c;
- tmp3 = c - b + 1;
+ tmp3 = ABS(c - b) + 1;
} else {
tmp2 += offs;
}
More information about the Scummvm-git-logs
mailing list