diff options
author | Arnaud Boutonné | 2011-01-02 21:32:56 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2011-01-02 21:32:56 +0000 |
commit | eeaeab93e8b60a81cf2de2d90b7fe9043f5c730a (patch) | |
tree | d4a3f2a00f8eb40371a8df4b0a2d93dbc2cb51ea /engines/hugo | |
parent | 83f0a286230b5a461f8a33f43c1686aa1eab25f7 (diff) | |
download | scummvm-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.cpp | 2 | ||||
-rw-r--r-- | engines/hugo/object.cpp | 3 |
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], |