From 6385e77d85471ff0bc759122a8d0a4b064b13a28 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 1 Jan 2010 20:37:02 +0000 Subject: 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 --- engines/saga/script.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3