[Scummvm-cvs-logs] SF.net SVN: scummvm:[49127] scummvm/trunk/engines/parallaction/parser.cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Fri May 21 13:05:18 CEST 2010
Revision: 49127
http://scummvm.svn.sourceforge.net/scummvm/?rev=49127&view=rev
Author: peres001
Date: 2010-05-21 11:05:18 +0000 (Fri, 21 May 2010)
Log Message:
-----------
Added a new valid EOL character for scripts. Patch 3004990 by fuzzie.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/parser.cpp
Modified: scummvm/trunk/engines/parallaction/parser.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parser.cpp 2010-05-21 07:51:47 UTC (rev 49126)
+++ scummvm/trunk/engines/parallaction/parser.cpp 2010-05-21 11:05:18 UTC (rev 49127)
@@ -44,8 +44,10 @@
/*
* 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 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 = ' ';
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