mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 21:21:05 +00:00
Added precautionary tests to background scrolling function in Operation Stealth to avoid possible memory corruptions.
svn-id: r33688
This commit is contained in:
parent
853f4dbbe0
commit
da84a54694
@ -1041,8 +1041,12 @@ void OSRenderer::drawBackground() {
|
||||
|
||||
assert(scroll);
|
||||
|
||||
memcpy(_backBuffer, main + mainShift, mainSize);
|
||||
memcpy(_backBuffer + mainSize, scroll, mainShift);
|
||||
if (mainSize > 0) { // Just a precaution
|
||||
memcpy(_backBuffer, main + mainShift, mainSize);
|
||||
}
|
||||
if (mainShift > 0) { // Just a precaution
|
||||
memcpy(_backBuffer + mainSize, scroll, mainShift);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user