aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2008-05-13 18:43:26 +0000
committerSven Hesse2008-05-13 18:43:26 +0000
commit72dc3ecc55a3f2173ed12d86ae7413c2b627eca0 (patch)
treea423c776f840c1cc5f9df3599b2b5d98d1fde2dc /engines
parent3c119e17cbbaf4183a387a761e55c8e753589d6a (diff)
downloadscummvm-rg350-72dc3ecc55a3f2173ed12d86ae7413c2b627eca0.tar.gz
scummvm-rg350-72dc3ecc55a3f2173ed12d86ae7413c2b627eca0.tar.bz2
scummvm-rg350-72dc3ecc55a3f2173ed12d86ae7413c2b627eca0.zip
Fixing the crash when entering the virtual trip tower in Woodruff
svn-id: r32090
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/video.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp
index e1777681df..3034a38079 100644
--- a/engines/gob/video.cpp
+++ b/engines/gob/video.cpp
@@ -178,8 +178,8 @@ void Video::retrace(bool mouse) {
int screenOffset = _scrollOffsetY * _surfWidth + _scrollOffsetX;
int screenX = _screenDeltaX;
int screenY = _screenDeltaY;
- int screenWidth = _vm->_width;
- int screenHeight = _splitHeight1;
+ int screenWidth = MIN<int>(_surfWidth, _vm->_width);
+ int screenHeight = MIN<int>(_splitHeight1, _vm->_height - _splitHeight2 - _screenDeltaY);
g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + screenOffset,
_surfWidth, screenX, screenY, screenWidth, screenHeight);
@@ -188,7 +188,7 @@ void Video::retrace(bool mouse) {
screenOffset = _splitStart * _surfWidth;
screenX = 0;
screenY = _vm->_height - _splitHeight2;
- screenWidth = _vm->_width;
+ screenWidth = MIN<int>(_surfWidth, _vm->_width);
screenHeight = _splitHeight2;
g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + screenOffset,