aboutsummaryrefslogtreecommitdiff
path: root/engines/adl/display.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/adl/display.cpp')
-rw-r--r--engines/adl/display.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/adl/display.cpp b/engines/adl/display.cpp
index feef8fb2a4..e18de6adae 100644
--- a/engines/adl/display.cpp
+++ b/engines/adl/display.cpp
@@ -330,6 +330,9 @@ void Display::showCursor(bool enable) {
}
void Display::writeFrameBuffer(const Common::Point &p, byte color, byte mask) {
+ if (p.x >= DISPLAY_WIDTH || p.y >= DISPLAY_HEIGHT)
+ return;
+
byte *b = _frameBuf + p.y * DISPLAY_PITCH + p.x / 7;
color ^= *b;
color &= mask;