mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 03:10:22 +00:00
SCUMM: prevent possible issues when range is reversed
This commit is contained in:
parent
cc08993822
commit
0c3c7a4b5c
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user