diff options
author | Tony Puccinelli | 2010-08-11 01:11:16 +0000 |
---|---|---|
committer | Tony Puccinelli | 2010-08-11 01:11:16 +0000 |
commit | 3a7a0ba720f219c4780cf19d196cda9c0456a20b (patch) | |
tree | fe7f45242447dc7d14447babbdea9fbbb771c506 /engines/parallaction/parser.cpp | |
parent | 6543062e5701e8011a4b12abffa8afca56f30b3f (diff) | |
parent | fffec23a02cc88ed8daba0a3b50007b7e220c075 (diff) | |
download | scummvm-rg350-3a7a0ba720f219c4780cf19d196cda9c0456a20b.tar.gz scummvm-rg350-3a7a0ba720f219c4780cf19d196cda9c0456a20b.tar.bz2 scummvm-rg350-3a7a0ba720f219c4780cf19d196cda9c0456a20b.zip |
manually merged engines from trunk into branch
svn-id: r51964
Diffstat (limited to 'engines/parallaction/parser.cpp')
-rw-r--r-- | engines/parallaction/parser.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/parallaction/parser.cpp b/engines/parallaction/parser.cpp index 928f3f5b74..df1e91e8b4 100644 --- a/engines/parallaction/parser.cpp +++ b/engines/parallaction/parser.cpp @@ -44,8 +44,10 @@ Script::~Script() { /* * readLineIntern read a text line and prepares it for * parsing, by stripping the leading whitespace and - * changing tabs to spaces. It will stop on a CR or LF, - * and return an empty string (length = 0) when a line + * changing tabs to spaces. It will stop on a CR, LF, or + * SUB (0x1A), which may all occur at the end of a script + * line. + * Returns an empty string (length = 0) when a line * has no printable text in it. */ char *Script::readLineIntern(char *buf, size_t bufSize) { @@ -54,7 +56,8 @@ char *Script::readLineIntern(char *buf, size_t bufSize) { char c = _input->readSByte(); if (_input->eos()) break; - if (c == '\n' || c == '\r') + // break if EOL + if (c == '\n' || c == '\r' || c == (char)0x1A) break; if (c == '\t') c = ' '; |