Fix collada parser fails on Mixamo exports

pull/4632/head
Engin Manap 2022-07-08 23:42:41 +02:00
parent 8a90ba8a39
commit e63426b89c
1 changed files with 6 additions and 1 deletions

View File

@ -1616,12 +1616,17 @@ void ColladaParser::ReadIndexData(XmlNode &node, Mesh &pMesh) {
XmlParser::getValueAsString(currentNode, v);
const char *content = v.c_str();
vcount.reserve(numPrimitives);
SkipSpacesAndLineEnd(&content);
for (unsigned int a = 0; a < numPrimitives; a++) {
if (*content == 0) {
throw DeadlyImportError("Expected more values while reading <vcount> contents.");
}
// read a number
vcount.push_back((size_t)strtoul10(content, &content));
size_t valueRead = (size_t)strtoul10(content, &content);
if(valueRead == 0) {
printf("wohoo");
}
vcount.push_back(valueRead);
// skip whitespace after it
SkipSpacesAndLineEnd(&content);
}