Merge pull request #4759 from Let0s/trailing_zero_fix_collada_exporter

Fixed error with trailing zero symbol as placeholder character
pull/4776/head
Kim Kulling 2022-10-23 18:34:28 +02:00 committed by GitHub
commit c2967cf79a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ void ExportSceneCollada(const char *pFile, IOSystem *pIOSystem, const aiScene *p
// Encodes a string into a valid XML ID using the xsd:ID schema qualifications. // Encodes a string into a valid XML ID using the xsd:ID schema qualifications.
static const std::string XMLIDEncode(const std::string &name) { static const std::string XMLIDEncode(const std::string &name) {
const char XML_ID_CHARS[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-."; const char XML_ID_CHARS[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-.";
const unsigned int XML_ID_CHARS_COUNT = sizeof(XML_ID_CHARS) / sizeof(char); const unsigned int XML_ID_CHARS_COUNT = sizeof(XML_ID_CHARS) / sizeof(char) - 1;
if (name.length() == 0) { if (name.length() == 0) {
return name; return name;