mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01:16 +00:00
Fix stride/length check in vtable24 and vtable28
This commit is contained in:
parent
f301b6b189
commit
2dfbc763b5
@ -398,7 +398,7 @@ void MxDisplaySurface::VTable0x28(
|
||||
MxU16* p16bitPal = m_16bitPal;
|
||||
|
||||
MxS32 i;
|
||||
if (stride || length) {
|
||||
if (!stride && !length) {
|
||||
while (height--) {
|
||||
MxU8* surfaceBefore = surface;
|
||||
|
||||
@ -1131,8 +1131,7 @@ void MxDisplaySurface::VTable0x24(
|
||||
MxU16* p16bitPal = m_16bitPal;
|
||||
|
||||
MxS32 i;
|
||||
// DECOMP: branches swapped from VTable0x28
|
||||
if (stride || length) {
|
||||
if (!stride && !length) {
|
||||
while (height--) {
|
||||
MxU8* surfaceBefore = surface;
|
||||
|
||||
@ -1146,10 +1145,7 @@ void MxDisplaySurface::VTable0x24(
|
||||
surface += 2;
|
||||
}
|
||||
|
||||
data += stride;
|
||||
surface += length;
|
||||
|
||||
memcpy(surface, surfaceBefore, p_width * 4);
|
||||
memcpy(surface, surfaceBefore, copyWidth);
|
||||
surface += p_desc->lPitch;
|
||||
}
|
||||
}
|
||||
@ -1167,7 +1163,10 @@ void MxDisplaySurface::VTable0x24(
|
||||
surface += 2;
|
||||
}
|
||||
|
||||
memcpy(surface, surfaceBefore, copyWidth);
|
||||
data += stride;
|
||||
surface += length;
|
||||
|
||||
memcpy(surface, surfaceBefore, p_width * 4);
|
||||
surface += p_desc->lPitch;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user