Merged rev 38209 from 0.13 to trunk: XML parsing fix

svn-id: r38241
This commit is contained in:
Oystein Eftevaag 2009-02-15 14:00:41 +00:00
parent 5b86801553
commit a99e3e3fa6

View file

@ -333,16 +333,17 @@ protected:
return parserError("Malformed comment syntax."); return parserError("Malformed comment syntax.");
_char = _stream->readByte(); _char = _stream->readByte();
bool dash = false;
while (_char) { while (_char) {
if (_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(); _char = _stream->readByte();
return true; return true;
} }
dash = !dash;
} }
_char = _stream->readByte(); _char = _stream->readByte();