diff --git a/code/AssetLib/Collada/ColladaParser.cpp b/code/AssetLib/Collada/ColladaParser.cpp index 922d1f6b2..25034defb 100644 --- a/code/AssetLib/Collada/ColladaParser.cpp +++ b/code/AssetLib/Collada/ColladaParser.cpp @@ -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 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); }