From 5c58b9a3a4a8848474aba18c02c0da997fb138a2 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 15 Jun 2009 23:09:57 +0000 Subject: [PATCH] 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 --- engines/gob/parse.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/engines/gob/parse.cpp b/engines/gob/parse.cpp index 101f4f4545e..50edae1c8a2 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;