diff options
| author | Max Horn | 2006-01-29 19:18:15 +0000 |
|---|---|---|
| committer | Max Horn | 2006-01-29 19:18:15 +0000 |
| commit | 2fcb159a98f44ecd647f833b20ca4e1a14a60994 (patch) | |
| tree | cbec08ba81fc6ad30c1a82d67696c48db168a784 /gob/inter_v1.cpp | |
| parent | 2ce2bac35c51ed0854c644874696993e382e5d5e (diff) | |
| download | scummvm-rg350-2fcb159a98f44ecd647f833b20ca4e1a14a60994.tar.gz scummvm-rg350-2fcb159a98f44ecd647f833b20ca4e1a14a60994.tar.bz2 scummvm-rg350-2fcb159a98f44ecd647f833b20ca4e1a14a60994.zip | |
Remove the custom strstr in favor of the ANSI strstr/strchr functions
svn-id: r20301
Diffstat (limited to 'gob/inter_v1.cpp')
| -rw-r--r-- | gob/inter_v1.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gob/inter_v1.cpp b/gob/inter_v1.cpp index 5c23bc2cb8..9e5c0aa876 100644 --- a/gob/inter_v1.cpp +++ b/gob/inter_v1.cpp @@ -1032,8 +1032,9 @@ bool Inter_v1::o1_strstr(char &cmdCount, int16 &counter, int16 &retFlag) { evalExpr(0); resVar = _vm->_parse->parseVarIndex(); - pos = _vm->_util->strstr(_vm->_global->_inter_resStr, _vm->_global->_inter_variables + strVar); - WRITE_VAR_OFFSET(resVar, pos - 1); + char *res = strstr(_vm->_global->_inter_variables + strVar, _vm->_global->_inter_resStr); + pos = res ? (res - (_vm->_global->_inter_variables + strVar)) : 0; + WRITE_VAR_OFFSET(resVar, pos); return false; } |
