Skip to content

Commit

Permalink
SCI: fix negative array access in parseNodes
Browse files Browse the repository at this point in the history
was used for debug command only
CID 1003543
  • Loading branch information
Martin Kiewitz committed Jan 27, 2014
1 parent 0f5eeae commit 3f116d9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions engines/sci/parser/vocabulary.cpp
Expand Up @@ -724,14 +724,13 @@ int Vocabulary::parseNodes(int *i, int *pos, int type, int nr, int argc, const c

newPos = parseNodes(i, pos, nextToken, nextValue, argc, argv);

if (newPos == -1)
return -1;

if (j == 0)
_parserNodes[oldPos].left = &_parserNodes[newPos];
else
_parserNodes[oldPos].right = &_parserNodes[newPos];


if (newPos == -1)
return -1;
}

const char *token = argv[(*i)++];
Expand Down

0 comments on commit 3f116d9

Please sign in to comment.