aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/screen.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 8d4ea7e022..bc1ccbb801 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -1190,6 +1190,8 @@ void Screen::drawCharANSI(uint8 c, int x, int y) {
const int charWidth = fnt->getCharWidth(c);
const int charHeight = fnt->getHeight();
+ if (x < 0 || y < 0)
+ return;
if (x + charWidth > SCREEN_W || y + charHeight > SCREEN_H)
return;