diff options
author | Filippos Karapetis | 2009-10-01 15:33:38 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-01 15:33:38 +0000 |
commit | 6697f469224a00bda5d6f6e383d71ad4a6faedbb (patch) | |
tree | 0321a4daadf529bdd604ef56e61c15029778ec1f /engines | |
parent | 934e92c28378970e70c6d725db7606c0d7106228 (diff) | |
download | scummvm-rg350-6697f469224a00bda5d6f6e383d71ad4a6faedbb.tar.gz scummvm-rg350-6697f469224a00bda5d6f6e383d71ad4a6faedbb.tar.bz2 scummvm-rg350-6697f469224a00bda5d6f6e383d71ad4a6faedbb.zip |
Rewrote weird-looking code, which might lead to undefined behavior, according to GNU
svn-id: r44523
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kmenu.cpp | 7 | ||||
-rw-r--r-- | engines/sci/engine/kstring.cpp | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/engines/sci/engine/kmenu.cpp b/engines/sci/engine/kmenu.cpp index 18c357162c..92eefd542f 100644 --- a/engines/sci/engine/kmenu.cpp +++ b/engines/sci/engine/kmenu.cpp @@ -163,13 +163,12 @@ reg_t kMenuSelect(EngineState *s, int argc, reg_t *argv) { && item->matchKey(message, modifiers)) || ((type == SCI_EVT_SAID) /* Said event */ && (item->_flags & MENU_ATTRIBUTE_FLAGS_SAID) - && (said(s, item->_said, #ifdef DEBUG_PARSER - 1 + && (said(s, item->_said, 1) #else - 0 + && (said(s, item->_said, 0) #endif - ) != SAID_NO_MATCH) + != SAID_NO_MATCH) ) ) ) { diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 740e70ffb4..2fd0d1c715 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -103,13 +103,11 @@ reg_t kSaid(EngineState *s, int argc, reg_t *argv) { return NULL_REG; } - new_lastmatch = said(s, said_block, #ifdef DEBUG_PARSER - 1 + new_lastmatch = said(s, said_block, 1); #else - 0 + new_lastmatch = said(s, said_block, 0); #endif - ); if (new_lastmatch != SAID_NO_MATCH) { /* Build and possibly display a parse tree */ #ifdef DEBUG_PARSER |