[Scummvm-cvs-logs] SF.net SVN: scummvm: [27959] scummvm/trunk/engines/parallaction/parser.cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Jul 8 10:34:20 CEST 2007
Revision: 27959
http://scummvm.svn.sourceforge.net/scummvm/?rev=27959&view=rev
Author: peres001
Date: 2007-07-08 01:34:19 -0700 (Sun, 08 Jul 2007)
Log Message:
-----------
Parser is now able to deal with missing quotes at the end of instructions in location scripts.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/parser.cpp
Modified: scummvm/trunk/engines/parallaction/parser.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parser.cpp 2007-07-08 08:13:32 UTC (rev 27958)
+++ scummvm/trunk/engines/parallaction/parser.cpp 2007-07-08 08:34:19 UTC (rev 27959)
@@ -127,11 +127,7 @@
char *parseNextToken(char *s, char *tok, uint16 count, const char *brk) {
while (*s != '\0') {
-
- if (brk[0] == *s) break;
- if (brk[1] == *s) break;
- if (brk[2] == *s) break;
-
+ if (strchr(brk, *s)) break;
*tok++ = *s++;
}
@@ -143,7 +139,7 @@
uint16 i = 0;
while (strlen(line) > 0 && i < 20) {
- line = parseNextToken(line, _tokens[i], 40, " \t\n");
+ line = parseNextToken(line, _tokens[i], 40, " \t\n\a");
if (_tokens[i][0] == '"' && _tokens[i][strlen(_tokens[i]) - 1] != '"') {
line = parseNextToken(line, _tokens[i+1], 40, "\"");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list