From 73f7f88c96a860b27e2e53dc136442e7e2b8e545 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 8 Mar 2003 13:26:20 +0000 Subject: hacked in some crude clipping code for drawChar; let's see if that helps Valgrind svn-id: r6771 --- scumm/nut_renderer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scumm/nut_renderer.cpp') diff --git a/scumm/nut_renderer.cpp b/scumm/nut_renderer.cpp index 80eff150ff..1aa47d447f 100644 --- a/scumm/nut_renderer.cpp +++ b/scumm/nut_renderer.cpp @@ -209,6 +209,8 @@ 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) + continue; #if 1 if (pixel != 0) { dst[tx] = color; -- cgit v1.2.3