aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-03-08 13:26:20 +0000
committerMax Horn2003-03-08 13:26:20 +0000
commit73f7f88c96a860b27e2e53dc136442e7e2b8e545 (patch)
treec028a73c5be00ae3ba53120a57e065e63eb6b270 /scumm
parent51531a7b09c5401e6d2a23e12ce03c53f47b4886 (diff)
downloadscummvm-rg350-73f7f88c96a860b27e2e53dc136442e7e2b8e545.tar.gz
scummvm-rg350-73f7f88c96a860b27e2e53dc136442e7e2b8e545.tar.bz2
scummvm-rg350-73f7f88c96a860b27e2e53dc136442e7e2b8e545.zip
hacked in some crude clipping code for drawChar; let's see if that helps Valgrind
svn-id: r6771
Diffstat (limited to 'scumm')
-rw-r--r--scumm/nut_renderer.cpp2
1 files changed, 2 insertions, 0 deletions
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;