lib/xmltree/xmlparse.cpp: fix (workaround?) for crash while parsing invalid saved xml

This commit is contained in:
[CST] Focus
2012-05-14 18:30:55 +04:00
parent 630d9892e5
commit c8b4d271f9

View File

@@ -392,7 +392,8 @@ long XML_Parser::GetCurrentByteIndex()
int XML_Parser::GetCurrentLineNumber() int XML_Parser::GetCurrentLineNumber()
{ {
if (eventPtr) /* at EOF positionPtr point to input, while eventPtr not updated -- focus */
if (eventPtr && (positionPtr < eventPtr))
{ {
XmlUpdatePosition(encoding, positionPtr, eventPtr, &position); XmlUpdatePosition(encoding, positionPtr, eventPtr, &position);
positionPtr=eventPtr; positionPtr=eventPtr;