From 50ce07c3918ffe7931a9030591e34df4a880f4fe Mon Sep 17 00:00:00 2001 From: Jamieson Christian Date: Mon, 11 Aug 2003 03:52:34 +0000 Subject: Fix for Bug [770364] MI2: Amiga - Segfault when entering bar Possible fix for Bug [770085] MI2: Amiga version always crashes after a few minutes Corrected OOB graphics writes in proc3_ami() by fixing the mask to properly detect negative Y values. Don't know if this is the right way to fix this -- there are enough GFX bugs in the Amiga code as to make assessment difficult -- but at least it averts crashes. svn-id: r9634 --- scumm/costume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scumm/costume.cpp b/scumm/costume.cpp index e36240dc2d..2ad73cafac 100644 --- a/scumm/costume.cpp +++ b/scumm/costume.cpp @@ -496,7 +496,7 @@ void CostumeRenderer::proc3_ami() { len = *src++; do { if (_scaleY == 255 || cost_scaleTable[_scaleIndexY] < _scaleY) { - masked = (y < _outheight) && v1.mask_ptr && ((mask[0] | mask[v1.imgbufoffs]) & maskbit); + masked = (y >= _outheight) || v1.mask_ptr && ((mask[0] | mask[v1.imgbufoffs]) & maskbit); if (color && v1.x >= 0 && v1.x < _vm->_screenWidth && !masked) { *dst = _palette[color]; -- cgit v1.2.3