Patch 713149: Fix OOB access

svn-id: r6893
This commit is contained in:
Max Horn 2003-04-01 15:32:17 +00:00
parent 0c0ee74449
commit 68e7ce8143

View File

@ -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) {