[Scummvm-cvs-logs] SF.net SVN: scummvm: [28204] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Wed Jul 25 23:02:30 CEST 2007
Revision: 28204
http://scummvm.svn.sourceforge.net/scummvm/?rev=28204&view=rev
Author: drmccoy
Date: 2007-07-25 14:02:30 -0700 (Wed, 25 Jul 2007)
Log Message:
-----------
Some more safety checks and the first room's background can be seen
Modified Paths:
--------------
scummvm/trunk/engines/gob/goblin.cpp
scummvm/trunk/engines/gob/goblin_v3.cpp
scummvm/trunk/engines/gob/inter_v1.cpp
scummvm/trunk/engines/gob/scenery.cpp
Modified: scummvm/trunk/engines/gob/goblin.cpp
===================================================================
--- scummvm/trunk/engines/gob/goblin.cpp 2007-07-25 20:36:14 UTC (rev 28203)
+++ scummvm/trunk/engines/gob/goblin.cpp 2007-07-25 21:02:30 UTC (rev 28204)
@@ -1698,6 +1698,9 @@
int16 sndSlot;
int16 frame;
+ if (!obj->goblinStates)
+ return;
+
animData = obj->pAnimData;
for (int i = 1; i <= obj->goblinStates[animData->state][0].dataCount; i++) {
Modified: scummvm/trunk/engines/gob/goblin_v3.cpp
===================================================================
--- scummvm/trunk/engines/gob/goblin_v3.cpp 2007-07-25 20:36:14 UTC (rev 28203)
+++ scummvm/trunk/engines/gob/goblin_v3.cpp 2007-07-25 21:02:30 UTC (rev 28204)
@@ -115,6 +115,9 @@
Mult::Mult_Object &obj = _vm->_mult->_objects[index];
Mult::Mult_AnimData &objAnim = *(obj.pAnimData);
+ if (!obj.goblinStates)
+ return;
+
if ((state != -1) && (obj.goblinStates[state] != 0)) {
if (state == 8)
objAnim.curLookDir = 0;
Modified: scummvm/trunk/engines/gob/inter_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v1.cpp 2007-07-25 20:36:14 UTC (rev 28203)
+++ scummvm/trunk/engines/gob/inter_v1.cpp 2007-07-25 21:02:30 UTC (rev 28204)
@@ -1705,6 +1705,10 @@
top = _vm->_parse->parseValExpr();
width = _vm->_parse->parseValExpr();
height = _vm->_parse->parseValExpr();
+
+ if ((width < 0) || (height < 0))
+ return false;
+
_vm->_game->capturePush(left, top, width, height);
(*_vm->_scenery->_pCaptureCounter)++;
return false;
Modified: scummvm/trunk/engines/gob/scenery.cpp
===================================================================
--- scummvm/trunk/engines/gob/scenery.cpp 2007-07-25 20:36:14 UTC (rev 28203)
+++ scummvm/trunk/engines/gob/scenery.cpp 2007-07-25 21:02:30 UTC (rev 28204)
@@ -320,7 +320,7 @@
int16 top;
int16 bottom;
- if (layer >= _statics[index].layersCount)
+ if ((index >= 10) || layer >= _statics[index].layersCount)
return;
layerPtr = &_statics[index].layers[layer];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list