mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-17 07:07:10 +00:00
HUGO: Fix 2 bugs that were causing several crashes using the mouse
svn-id: r55097
This commit is contained in:
parent
83f0a28623
commit
eeaeab93e8
@ -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])))
|
||||
|
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user