From cdae0280bee62f5d98e1834d51bb5dc2cd7aa4d1 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 8 Jul 2007 08:34:19 +0000 Subject: [PATCH] Parser is now able to deal with missing quotes at the end of instructions in location scripts. svn-id: r27959 --- engines/parallaction/parser.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/engines/parallaction/parser.cpp b/engines/parallaction/parser.cpp index f044e6c3c72..812f48c821c 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, "\"");