diff options
author | Nicola Mettifogo | 2007-10-06 21:15:53 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-10-06 21:15:53 +0000 |
commit | 0fab64817fd027a8321e047c1007d0e7e9e135fc (patch) | |
tree | 447c3de95e45f74da7a1ebb06ce736ad2cd6b47b | |
parent | 9280c25a3617d5a60257f11c3f6864ef4fff99dd (diff) | |
download | scummvm-rg350-0fab64817fd027a8321e047c1007d0e7e9e135fc.tar.gz scummvm-rg350-0fab64817fd027a8321e047c1007d0e7e9e135fc.tar.bz2 scummvm-rg350-0fab64817fd027a8321e047c1007d0e7e9e135fc.zip |
Fixed bug #1808615. An unexpected (but harmless) 'ENDCOMMANDS' statement was spotted in the game scripts by the new stricter parser.
svn-id: r29158
-rw-r--r-- | engines/parallaction/parallaction.h | 1 | ||||
-rw-r--r-- | engines/parallaction/parser_ns.cpp | 7 | ||||
-rw-r--r-- | engines/parallaction/staticres.cpp | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 6bac39f579..9173e143b3 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -745,6 +745,7 @@ protected: DECLARE_UNQUALIFIED_ZONE_PARSER(label); DECLARE_UNQUALIFIED_ZONE_PARSER(flags); DECLARE_UNQUALIFIED_ZONE_PARSER(endzone); + DECLARE_UNQUALIFIED_ZONE_PARSER(null); DECLARE_UNQUALIFIED_ANIM_PARSER(invalid); DECLARE_UNQUALIFIED_ANIM_PARSER(script); DECLARE_UNQUALIFIED_ANIM_PARSER(commands); diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index a834648291..41bd97e3b3 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -1136,7 +1136,8 @@ void Parallaction_ns::initParsers() { ZONE_PARSER(commands), ZONE_PARSER(label), ZONE_PARSER(flags), - ZONE_PARSER(endzone) + ZONE_PARSER(endzone), + ZONE_PARSER(null) }; for (i = 0; i < ARRAYSIZE(op5); i++) @@ -1190,6 +1191,10 @@ char *Parallaction_ns::parseComment(Script &script) { return v194; } +DECLARE_ZONE_PARSER(null) { + debugC(7, kDebugParser, "ZONE_PARSER(null) "); +} + DECLARE_ZONE_PARSER(invalid) { debugC(7, kDebugParser, "ZONE_PARSER(invalid) "); diff --git a/engines/parallaction/staticres.cpp b/engines/parallaction/staticres.cpp index 2d5cb5f7e6..b7af7dc1b2 100644 --- a/engines/parallaction/staticres.cpp +++ b/engines/parallaction/staticres.cpp @@ -343,7 +343,8 @@ const char *_locationZoneStmtRes_ns[] = { "commands", "label", "flags", - "endzone" + "endzone", + "endcommands" // this to prevent unexpected statements in the scripts to crash the parser }; const char *_locationAnimStmtRes_ns[] = { |