diff options
author | Eugene Sandulenko | 2015-11-27 22:49:18 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-11-27 22:49:18 +0100 |
commit | 8f3d528b7efba1b3c86a5a4934eae5ace78459a9 (patch) | |
tree | cc40db2e265cb53e778b8e401ce3753de3abf2f6 /engines/agi | |
parent | 98559576977aaf020739e596f9440e81aa7d06fa (diff) | |
download | scummvm-rg350-8f3d528b7efba1b3c86a5a4934eae5ace78459a9.tar.gz scummvm-rg350-8f3d528b7efba1b3c86a5a4934eae5ace78459a9.tar.bz2 scummvm-rg350-8f3d528b7efba1b3c86a5a4934eae5ace78459a9.zip |
AGI: Better pointer checking
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/words.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/agi/words.cpp b/engines/agi/words.cpp index ff9049fdc5..438c1ce354 100644 --- a/engines/agi/words.cpp +++ b/engines/agi/words.cpp @@ -161,11 +161,13 @@ void AgiEngine::dictionaryWords(char *msg) { char *q = NULL; int wid, wlen; + assert(msg); + debugC(2, kDebugLevelScripts, "msg = \"%s\"", msg); cleanInput(); - for (p = msg; p && *p && getvar(vWordNotFound) == 0;) { + for (p = msg; *p && getvar(vWordNotFound) == 0;) { if (*p == 0x20) p++; @@ -205,7 +207,7 @@ void AgiEngine::dictionaryWords(char *msg) { break; } - if (p != NULL && *p) { + if (*p) { debugC(2, kDebugLevelScripts, "p = %s", p); *p = 0; p++; |