diff options
author | Strangerke | 2013-04-10 18:16:21 +0200 |
---|---|---|
committer | Strangerke | 2013-04-10 18:16:21 +0200 |
commit | 531b3cb37660e21abfba79fe80450c63e04245f4 (patch) | |
tree | 5910a69448972c0a463f19b7c30d7dc2e59c4375 /engines | |
parent | 2709ac9fcbbf0f7ac37a1f8a0c3ec6b81a63f059 (diff) | |
download | scummvm-rg350-531b3cb37660e21abfba79fe80450c63e04245f4.tar.gz scummvm-rg350-531b3cb37660e21abfba79fe80450c63e04245f4.tar.bz2 scummvm-rg350-531b3cb37660e21abfba79fe80450c63e04245f4.zip |
HOPKINS: Fix crash when skipping intro animations (regression in one of the lock/unlock commits)
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/graphics.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index b58c2c3544..f7d69ff1f2 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -733,7 +733,8 @@ void GraphicsManager::copyVideoVbe16(const byte *srcData) { byte srcByte = srcP[0]; if (srcByte >= 222) { if (srcByte == kByteStop) - return; + break; + if (srcByte < kSetOffset) { destOffset += srcByte - 221; srcByte = *++srcP; @@ -754,7 +755,7 @@ void GraphicsManager::copyVideoVbe16(const byte *srcData) { if (destOffset > SCREEN_WIDTH * SCREEN_HEIGHT) { warning("HACK: Stopping anim, out of bounds - 0x%x %d", srcByte, destOffset); - return; + break; } if (srcByte > 210) { @@ -805,7 +806,7 @@ void GraphicsManager::copyVideoVbe16a(const byte *srcData) { for (;;) { srcByte = srcP[0]; if (srcByte == kByteStop) - return; + break; if (srcP[0] > kByteStop) { if (srcByte == k8bVal) { destOffset += srcP[1]; |