aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo
diff options
context:
space:
mode:
authorArnaud Boutonné2011-01-02 21:32:56 +0000
committerArnaud Boutonné2011-01-02 21:32:56 +0000
commiteeaeab93e8b60a81cf2de2d90b7fe9043f5c730a (patch)
treed4a3f2a00f8eb40371a8df4b0a2d93dbc2cb51ea /engines/hugo
parent83f0a286230b5a461f8a33f43c1686aa1eab25f7 (diff)
downloadscummvm-rg350-eeaeab93e8b60a81cf2de2d90b7fe9043f5c730a.tar.gz
scummvm-rg350-eeaeab93e8b60a81cf2de2d90b7fe9043f5c730a.tar.bz2
scummvm-rg350-eeaeab93e8b60a81cf2de2d90b7fe9043f5c730a.zip
HUGO: Fix 2 bugs that were causing several crashes using the mouse
svn-id: r55097
Diffstat (limited to 'engines/hugo')
-rw-r--r--engines/hugo/hugo.cpp2
-rw-r--r--engines/hugo/object.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 0dc062a0bc..c7bc3fe313 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -1173,7 +1173,7 @@ char *HugoEngine::useBG(char *name) {
debugC(1, kDebugEngine, "useBG(%s)", name);
objectList_t p = _backgroundObjects[*_screen_p];
- for (int i = 0; *_arrayVerbs[p[i].verbIndex]; i++) {
+ for (int i = 0; p[i].verbIndex != 0; i++) {
if ((name == _arrayNouns[p[i].nounIndex][0] &&
p[i].verbIndex != _look) &&
((p[i].roomState == DONT_CARE) || (p[i].roomState == _screenStates[*_screen_p])))
diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp
index 3316807c68..58f9774b1d 100644
--- a/engines/hugo/object.cpp
+++ b/engines/hugo/object.cpp
@@ -118,7 +118,8 @@ void ObjectHandler::useObject(int16 objId) {
if (_vm->getGameStatus().inventoryObjId == use->objId) {
// Look for secondary object, if found use matching verb
bool foundFl = false;
- for (target_t *target = use->targets; _vm->_arrayNouns[target->nounIndex] != 0; target++)
+
+ for (target_t *target = use->targets; target->nounIndex != 0; target++)
if (target->nounIndex == obj->nounIndex) {
foundFl = true;
sprintf(_line, "%s %s %s", _vm->_arrayVerbs[target->verbIndex][0],