Fix md5-parsing
parent
2dd676d42a
commit
8632a16788
|
@ -468,16 +468,15 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object,
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ((*it).GetType()) {
|
switch ((*it).GetType()) {
|
||||||
// closed line
|
case Surface::ClosedLine: // closed line
|
||||||
case Surface::ClosedLine:
|
needMat[idx].first += static_cast<unsigned int>((*it).entries.size());
|
||||||
needMat[idx].first += (unsigned int)(*it).entries.size();
|
needMat[idx].second += static_cast<unsigned int>((*it).entries.size() << 1u);
|
||||||
needMat[idx].second += (unsigned int)(*it).entries.size() << 1u;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// unclosed line
|
// unclosed line
|
||||||
case Surface::OpenLine:
|
case Surface::OpenLine:
|
||||||
needMat[idx].first += (unsigned int)(*it).entries.size() - 1;
|
needMat[idx].first += static_cast<unsigned int>((*it).entries.size() - 1);
|
||||||
needMat[idx].second += ((unsigned int)(*it).entries.size() - 1) << 1u;
|
needMat[idx].second += static_cast<unsigned int>(((*it).entries.size() - 1) << 1u);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// triangle strip
|
// triangle strip
|
||||||
|
|
|
@ -263,7 +263,8 @@ inline bool AI_MD5_PARSE_STRING(const char **sz, const char *bufferEnd, aiString
|
||||||
szStart++;
|
szStart++;
|
||||||
if ('\"' != *(szEnd -= 1)) {
|
if ('\"' != *(szEnd -= 1)) {
|
||||||
MD5Parser::ReportWarning("Expected closing quotation marks in string", linenumber);
|
MD5Parser::ReportWarning("Expected closing quotation marks in string", linenumber);
|
||||||
return false;
|
++*sz;
|
||||||
|
//return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
out.length = (ai_uint32)(szEnd - szStart);
|
out.length = (ai_uint32)(szEnd - szStart);
|
||||||
|
@ -284,7 +285,8 @@ inline void AI_MD5_PARSE_STRING_IN_QUOTATION(const char **sz, const char *buffer
|
||||||
++*sz;
|
++*sz;
|
||||||
}
|
}
|
||||||
if ('\0' != **sz) {
|
if ('\0' != **sz) {
|
||||||
const char *szEnd = (*sz++);
|
const char *szEnd = *sz;
|
||||||
|
++*sz;
|
||||||
out.length = (ai_uint32)(szEnd - szStart);
|
out.length = (ai_uint32)(szEnd - szStart);
|
||||||
::memcpy(out.data, szStart, out.length);
|
::memcpy(out.data, szStart, out.length);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue