aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOystein Eftevaag2009-02-15 14:00:41 +0000
committerOystein Eftevaag2009-02-15 14:00:41 +0000
commita99e3e3fa64eebe5b427edcc193ad01fb75cd222 (patch)
treeac2f7aea90bac509edc030c60e334c1dcb4d77ac
parent5b86801553966b0fc71ae9b357506fac4e37a944 (diff)
downloadscummvm-rg350-a99e3e3fa64eebe5b427edcc193ad01fb75cd222.tar.gz
scummvm-rg350-a99e3e3fa64eebe5b427edcc193ad01fb75cd222.tar.bz2
scummvm-rg350-a99e3e3fa64eebe5b427edcc193ad01fb75cd222.zip
Merged rev 38209 from 0.13 to trunk: XML parsing fix
svn-id: r38241
-rw-r--r--common/xmlparser.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/xmlparser.h b/common/xmlparser.h
index c3eb68ca78..0f859ecf14 100644
--- a/common/xmlparser.h
+++ b/common/xmlparser.h
@@ -333,16 +333,17 @@ protected:
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();