Page 1 of 1

irrXML "single char after specialChar" bug

Posted: Sat Apr 22, 2006 3:06 am
by patfns
Example: <blabla myattr1="<sup>X"/>

The result of getAttributeValue() is "<sup>" and not "<sup>X".


It's a tiny bug in the replaceSpecialCharacters function (CXMLReaderImpl.h).
Here my bugfix:

// if (oldPos < origstr.size()-1)
if (oldPos <= origstr.size()-1)
newstr.append(origstr.subString(oldPos, origstr.size()-oldPos));

return newstr;
}