mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-03 07:11:49 +00:00
SCUMM: Fix backwards-in-same-array case of v72he::copyArray.
This commit is contained in:
parent
7b517f7fd1
commit
89e14f6862
@ -1779,8 +1779,11 @@ void ScummEngine_v72he::copyArray(int array1, int a1_dim2start, int a1_dim2end,
|
||||
copyArrayHelper(ah, a1_dim2start, a1_dim1start, a1_dim1end, &dst, &dstPitch, &rowSize);
|
||||
copyArrayHelper(ah, a2_dim2start, a2_dim1start, a2_dim1end, &src, &srcPitch, &rowSize);
|
||||
} else {
|
||||
// start at the end, so we copy backwards (in case the indices overlap)
|
||||
copyArrayHelper(ah, a1_dim2end, a1_dim1start, a1_dim1end, &dst, &dstPitch, &rowSize);
|
||||
copyArrayHelper(ah, a2_dim2end, a2_dim1start, a2_dim1end, &src, &srcPitch, &rowSize);
|
||||
dstPitch = -dstPitch;
|
||||
srcPitch = -srcPitch;
|
||||
}
|
||||
for (; a1_dim2start <= a1_dim2end; ++a1_dim2start) {
|
||||
memcpy(dst, src, rowSize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user