HUGO: Fix CID 1003560, 1002882

This commit is contained in:
Strangerke 2013-10-31 08:25:19 +01:00
parent ba50475dfa
commit 40c6569940
3 changed files with 16 additions and 3 deletions

View file

@ -398,9 +398,9 @@ void Parser::command(const char *format, ...) {
* Locate any member of object name list appearing in command line
*/
bool Parser::isWordPresent(char **wordArr) const {
debugC(1, kDebugParser, "isWordPresent(%s)", wordArr[0]);
if (wordArr != 0) {
debugC(1, kDebugParser, "isWordPresent(%s)", wordArr[0]);
for (int i = 0; strlen(wordArr[i]); i++) {
if (strstr(_vm->_line, wordArr[i]))
return true;