Bugfix: XML reader no longer drops last character in strings after certain character replacments

Due an off-by-one error it went wrong where there a special character replacement for the second-last character going on.
So something like "&lt;X" became "<" instead of "<X".

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6295 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2022-01-11 14:45:08 +00:00
parent 31f5da289f
commit 62cf8296b1
2 changed files with 2 additions and 1 deletions

View File

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