diff options
author | Sven Hesse | 2009-06-15 23:09:57 +0000 |
---|---|---|
committer | Sven Hesse | 2009-06-15 23:09:57 +0000 |
commit | 5c58b9a3a4a8848474aba18c02c0da997fb138a2 (patch) | |
tree | a3b3e2b36fe5107e72d9bdb2479eacdeb758135b /engines/gob | |
parent | f6ca65206f6e4498541ede7bc936f1700b36c253 (diff) | |
download | scummvm-rg350-5c58b9a3a4a8848474aba18c02c0da997fb138a2.tar.gz scummvm-rg350-5c58b9a3a4a8848474aba18c02c0da997fb138a2.tar.bz2 scummvm-rg350-5c58b9a3a4a8848474aba18c02c0da997fb138a2.zip |
Using cmpHelper for OP_NEQ too, since the original does a normal strcmp there as well. No idea where the stricmp came from
svn-id: r41570
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/parse.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/engines/gob/parse.cpp b/engines/gob/parse.cpp index 101f4f4545..50edae1c8a 100644 --- a/engines/gob/parse.cpp +++ b/engines/gob/parse.cpp @@ -1036,26 +1036,12 @@ int16 Parse::parseExpr(byte stopToken, byte *type) { valPtr -= 2; break; - case OP_NEQ: { - int cmpTemp = 0; - - if (operPtr[-3] == OP_LOAD_IMM_INT16) { - cmpTemp = valPtr[-3] - valPtr[-1]; - } else if (operPtr[-3] == OP_LOAD_IMM_STR) { - if ((char *) decodePtr(valPtr[-3]) != _vm->_global->_inter_resStr) { - strcpy(_vm->_global->_inter_resStr, (char *) decodePtr(valPtr[-3])); - valPtr[-3] = encodePtr((byte *) _vm->_global->_inter_resStr, kResStr); - } - // FIXME: Why scumm_stricmp here and strcmp everywhere else? - cmpTemp = scumm_stricmp(_vm->_global->_inter_resStr, (char *) decodePtr(valPtr[-1])); - } - operPtr[-3] = (cmpTemp != 0) ? GOB_TRUE : GOB_FALSE; - //operPtr[-3] = (cmpHelper(operPtr, valPtr) != 0) ? GOB_TRUE : GOB_FALSE; + case OP_NEQ: + operPtr[-3] = (cmpHelper(operPtr, valPtr) != 0) ? GOB_TRUE : GOB_FALSE; stkPos -= 2; operPtr -= 2; valPtr -= 2; break; - } default: escape = true; |