[Scummvm-cvs-logs] SF.net SVN: scummvm:[38241] scummvm/trunk/common/xmlparser.h

vinterstum at users.sourceforge.net vinterstum at users.sourceforge.net
Sun Feb 15 15:00:41 CET 2009


Revision: 38241
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38241&view=rev
Author:   vinterstum
Date:     2009-02-15 14:00:41 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
Merged rev 38209 from 0.13 to trunk: XML parsing fix

Revision Links:
--------------
    http://scummvm.svn.sourceforge.net/scummvm/?rev=38209&view=rev

Modified Paths:
--------------
    scummvm/trunk/common/xmlparser.h

Modified: scummvm/trunk/common/xmlparser.h
===================================================================
--- scummvm/trunk/common/xmlparser.h	2009-02-15 13:58:15 UTC (rev 38240)
+++ scummvm/trunk/common/xmlparser.h	2009-02-15 14:00:41 UTC (rev 38241)
@@ -333,16 +333,17 @@
 				return parserError("Malformed comment syntax.");
 
 			_char = _stream->readByte();
-			bool dash = false;
 
 			while (_char) {
 				if (_char == '-') {
-					if (dash && _stream->readByte() == '>') {
+					if (_stream->readByte() == '-') {
+
+						if (_stream->readByte() != '>')
+							return parserError("Malformed comment (double-hyphen inside comment body).");
+
 						_char = _stream->readByte();
 						return true;
 					}
-
-					dash = !dash;
 				}
 
 				_char = _stream->readByte();


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