[Scummvm-cvs-logs] scummvm master -> 3f116d98bcc4374eec9117e0af4177c07b3a7ebd
m-kiewitz
m_kiewitz at users.sourceforge.net
Mon Jan 27 22:28:01 CET 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3f116d98bc SCI: fix negative array access in parseNodes
Commit: 3f116d98bcc4374eec9117e0af4177c07b3a7ebd
https://github.com/scummvm/scummvm/commit/3f116d98bcc4374eec9117e0af4177c07b3a7ebd
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2014-01-27T13:27:21-08:00
Commit Message:
SCI: fix negative array access in parseNodes
was used for debug command only
CID 1003543
Changed paths:
engines/sci/parser/vocabulary.cpp
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index f5b79d6..61659f8 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -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)++];
More information about the Scummvm-git-logs
mailing list