From 04efaa91757446c84439ec2d91ab7e26ba938ec1 Mon Sep 17 00:00:00 2001 From: Lionel Ulmer Date: Wed, 1 May 2002 09:37:03 +0000 Subject: [PATCH] Fix some bad memory accesses in LoomCD. The masking is still bad but at least Valgrind is not accusing ScummVM to be too buggy anymore :-) svn-id: r4153 --- costume.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/costume.cpp b/costume.cpp index 72db591c674..84d974776df 100644 --- a/costume.cpp +++ b/costume.cpp @@ -282,11 +282,11 @@ byte CostumeRenderer::mainRoutine(Actor * a, int slot, int frame) _vm->virtscr[0].topline + _bottom); masking = 0; - if (_zbuf) { + if (_vm->_features & GF_SMALL_HEADER) + masking = _zbuf; + else masking = _vm->isMaskActiveAt(_left, _top, _right, _bottom,_vm->getResourceAddress(rtBuffer,9) + - _vm->gdi._imgBufOffs[_zbuf] + - _vm->_screenStartStrip); - } + _vm->gdi._imgBufOffs[_zbuf] + _vm->_screenStartStrip); if (_zbuf || charsetmask) { _mask_ptr =_vm->getResourceAddress(rtBuffer,9) + _ypos * 40 + _vm->_screenStartStrip; @@ -1045,7 +1045,6 @@ byte Scumm::cost_increaseAnim(LoadedCostume * lc, Actor * a, int slot) if (i != end) i++; } - nc = lc->_dataptr[i]; if (nc == 0x7C) {