From 68e7ce814311cdb17eb541c7b3d161e26f08d0d6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 1 Apr 2003 15:32:17 +0000 Subject: Patch 713149: Fix OOB access svn-id: r6893 --- scumm/nut_renderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scumm/nut_renderer.cpp') diff --git a/scumm/nut_renderer.cpp b/scumm/nut_renderer.cpp index 1aa47d447f..f994511c29 100644 --- a/scumm/nut_renderer.cpp +++ b/scumm/nut_renderer.cpp @@ -209,7 +209,7 @@ void NutRenderer::drawChar(byte c, int32 x, int32 y, byte color, bool useMask) { maskpos = 0; for (int32 tx = 0; tx < width; tx++) { byte pixel = *src++; - if (x + tx >= 640 || y + ty >= 480) + if (x + tx < 0 || x + tx >= _vm->_realWidth || y + ty < 0 || y + ty >= _vm->_realHeight) continue; #if 1 if (pixel != 0) { -- cgit v1.2.3