[Scummvm-git-logs] scummvm master -> 7932cf7a467ed43911eb8265636dbd38afbcf3f2
athrxx
noreply at scummvm.org
Wed Aug 31 20:48:03 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:
7932cf7a46 SCUMM: (GUI) - fix invalid mem access
Commit: 7932cf7a467ed43911eb8265636dbd38afbcf3f2
https://github.com/scummvm/scummvm/commit/7932cf7a467ed43911eb8265636dbd38afbcf3f2
Author: athrxx (athrxx at scummvm.org)
Date: 2022-08-31T22:47:06+02:00
Commit Message:
SCUMM: (GUI) - fix invalid mem access
Changed paths:
engines/scumm/gfx.cpp
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 3cb8e7c90e2..c39929edab6 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -1659,11 +1659,11 @@ void ScummEngine::drawLine(int x1, int y1, int x2, int y2, int color) {
void ScummEngine::drawPixel(VirtScreen *vs, int x, int y, int16 color, bool useBackbuffer) {
if (x >= 0 && y >= 0 && _screenWidth + 8 > x && _screenHeight > y) {
if (useBackbuffer)
- memset(vs->getBackPixels(x, y + _screenTop), color, 1);
+ vs->setPixel(x, y + _screenTop - vs->topline, color);
else
- memset(vs->getPixels(x, y + _screenTop), color, 1);
+ vs->setPixel(x, y + _screenTop - vs->topline, color);
- markRectAsDirty(vs->number, x, x + 1, y + _screenTop, y + 1 + _screenTop);
+ markRectAsDirty(vs->number, x, x + 1, y + _screenTop - vs->topline, y + 1 + _screenTop - vs->topline);
}
}
More information about the Scummvm-git-logs
mailing list