Fix missing last character from replacing xml characters

This commit is contained in:
Benau 2019-12-18 14:25:10 +08:00
parent c1be829f0e
commit b79bfa46cc

View File

@ -570,7 +570,7 @@ private:
pos = origstr.findNext(L'&', pos); pos = origstr.findNext(L'&', pos);
} }
if (oldPos < (int)origstr.size()-1) if ((int)origstr.size()-oldPos > 0)
newstr.append(origstr.subString(oldPos, origstr.size()-oldPos)); newstr.append(origstr.subString(oldPos, origstr.size()-oldPos));
return newstr; return newstr;