diff options
author | Johannes Schickel | 2010-01-01 20:37:02 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-01 20:37:02 +0000 |
commit | 6385e77d85471ff0bc759122a8d0a4b064b13a28 (patch) | |
tree | 14e3033cd9cc58a8a712c1f49acd67b5f000f640 /engines/saga | |
parent | 2a9e83569513955805fde4bbe92e917a9c306c05 (diff) | |
download | scummvm-rg350-6385e77d85471ff0bc759122a8d0a4b064b13a28.tar.gz scummvm-rg350-6385e77d85471ff0bc759122a8d0a4b064b13a28.tar.bz2 scummvm-rg350-6385e77d85471ff0bc759122a8d0a4b064b13a28.zip |
Fix undefined operation in setNoPendingVerb (someone with knowledge of SAGA should review this, see the TODO comment). (Thanks to syke for reporting this)
svn-id: r46848
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/script.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/saga/script.h b/engines/saga/script.h index 664e16bf6e..0775ebf954 100644 --- a/engines/saga/script.h +++ b/engines/saga/script.h @@ -333,7 +333,16 @@ public: } void setNoPendingVerb() { _pendingVerb = getVerbType(kVerbNone); - _currentObject[0] = _currentObject[0] = ID_NOTHING; + // TODO: Someone with knowledge of SAGA should review this. + // This initially looked like: + // _currentObject[0] = _currentObject[0] = ID_NOTHING; + // and thus was an undefined operation on _currentObject[0] + // according to the C(++) standard. + // Now the question is whether this should really reset + // both objets or just _currentObject[0]. + // In case the current code is ok, just remove the TODO, + // otherwise fix the code and remove the TODO. + _currentObject[0] = _currentObject[1] = ID_NOTHING; setPointerVerb(); } int getVerbType(VerbTypes verbType); |