[Scummvm-cvs-logs] SF.net SVN: scummvm: [32524] scummvm/trunk/engines/parallaction/parser_ns. cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Wed Jun 4 03:27:55 CEST 2008
Revision: 32524
http://scummvm.svn.sourceforge.net/scummvm/?rev=32524&view=rev
Author: peres001
Date: 2008-06-03 18:27:55 -0700 (Tue, 03 Jun 2008)
Log Message:
-----------
Script instructions referencing unexisting animations are now skipped, instead of crashing the engine.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/parser_ns.cpp
Modified: scummvm/trunk/engines/parallaction/parser_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parser_ns.cpp 2008-06-04 01:04:26 UTC (rev 32523)
+++ scummvm/trunk/engines/parallaction/parser_ns.cpp 2008-06-04 01:27:55 UTC (rev 32524)
@@ -308,8 +308,6 @@
void ProgramParser_ns::parseInstruction() {
- InstructionPtr inst(new Instruction);
-
_script->readLineToken(true);
if (_tokens[0][1] == '.') {
@@ -322,10 +320,13 @@
} else
ctxt.a = _program->_anim;
+ if (!ctxt.a) {
+ return;
+ }
+
+ InstructionPtr inst(new Instruction);
ctxt.inst = inst;
-
_parser->parseStatement();
-
_program->_instructions.push_back(inst);
return;
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