aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorNicola Mettifogo2010-05-21 11:05:18 +0000
committerNicola Mettifogo2010-05-21 11:05:18 +0000
commit8b20f16378c377fdcbf14a6b0293154396a6d7b5 (patch)
tree761b275c390662396e7bdae3222367c74ac4103f /engines/parallaction
parente6ede6bba104d0d7c9fc9c8a114da8b7ba698fa5 (diff)
downloadscummvm-rg350-8b20f16378c377fdcbf14a6b0293154396a6d7b5.tar.gz
scummvm-rg350-8b20f16378c377fdcbf14a6b0293154396a6d7b5.tar.bz2
scummvm-rg350-8b20f16378c377fdcbf14a6b0293154396a6d7b5.zip
Added a new valid EOL character for scripts. Patch 3004990 by fuzzie.
svn-id: r49127
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/parser.cpp9
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 = ' ';