diff options
author | Nicola Mettifogo | 2007-07-08 08:34:19 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-07-08 08:34:19 +0000 |
commit | cdae0280bee62f5d98e1834d51bb5dc2cd7aa4d1 (patch) | |
tree | 7cca1baac001e7cc49fb2c1c8d6662c366f8823a /engines/parallaction | |
parent | 674f2e93c23457161808b9dbe7153094f2560c08 (diff) | |
download | scummvm-rg350-cdae0280bee62f5d98e1834d51bb5dc2cd7aa4d1.tar.gz scummvm-rg350-cdae0280bee62f5d98e1834d51bb5dc2cd7aa4d1.tar.bz2 scummvm-rg350-cdae0280bee62f5d98e1834d51bb5dc2cd7aa4d1.zip |
Parser is now able to deal with missing quotes at the end of instructions in location scripts.
svn-id: r27959
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/parser.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/parallaction/parser.cpp b/engines/parallaction/parser.cpp index f044e6c3c7..812f48c821 100644 --- a/engines/parallaction/parser.cpp +++ b/engines/parallaction/parser.cpp @@ -127,11 +127,7 @@ void clearTokens() { 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 fillTokens(char* line) { 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, "\""); |