Trim whitespace around parent indices
This prevents a bug where whitespace could accidentally delete some parents.
This commit is contained in:
parent
8b3aed1f29
commit
89ea0548ef
1 changed files with 2 additions and 0 deletions
|
@ -56,6 +56,8 @@ Skeleton parseHavokXML(const std::string_view path) {
|
||||||
pugi::xpath_node parentNode = doc.select_node("//hkparam[@name=\"parentIndices\"]");
|
pugi::xpath_node parentNode = doc.select_node("//hkparam[@name=\"parentIndices\"]");
|
||||||
|
|
||||||
std::string text = parentNode.node().text().as_string();
|
std::string text = parentNode.node().text().as_string();
|
||||||
|
std::replace(text.begin(), text.end(), '\n', ' ');
|
||||||
|
text.erase(std::remove(text.begin(), text.end(), '\t'), text.end());
|
||||||
|
|
||||||
auto parentIndices = tokenize(text, " ");
|
auto parentIndices = tokenize(text, " ");
|
||||||
|
|
||||||
|
|
Reference in a new issue