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

Origin commit data
------------------
Commit: c8b4d271f9
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-05-14 (Mon, 14 May 2012)
This commit is contained in:
[CST] Focus
2012-05-14 18:30:55 +04:00
parent ee5a6fd94a
commit 2b88bb3b76

View File

@@ -392,7 +392,8 @@ long XML_Parser::GetCurrentByteIndex()
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);
positionPtr=eventPtr;