aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamieson Christian2003-08-11 03:52:34 +0000
committerJamieson Christian2003-08-11 03:52:34 +0000
commit50ce07c3918ffe7931a9030591e34df4a880f4fe (patch)
tree42148d560f03711bc7f8b089b6a89bdafddd33e6
parent0e831751bc32a0f41448100d071b3cf8e3e1bddc (diff)
downloadscummvm-rg350-50ce07c3918ffe7931a9030591e34df4a880f4fe.tar.gz
scummvm-rg350-50ce07c3918ffe7931a9030591e34df4a880f4fe.tar.bz2
scummvm-rg350-50ce07c3918ffe7931a9030591e34df4a880f4fe.zip
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
-rw-r--r--scumm/costume.cpp2
1 files changed, 1 insertions, 1 deletions
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];