Draft: Update init of aiString (#5623)
* Draft: Update init of aiString - closes https://github.com/assimp/assimp/issues/5622 * Update types.h * Fix typo * Fix another typo * Adapt usage of AI_MAXLEN * Fix compare operator * Add missing renames
This commit is contained in:
@@ -909,9 +909,9 @@ void ValidateDSProcess::Validate(const aiNode *pNode) {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ValidateDSProcess::Validate(const aiString *pString) {
|
||||
if (pString->length > MAXLEN) {
|
||||
if (pString->length > AI_MAXLEN) {
|
||||
ReportError("aiString::length is too large (%u, maximum is %lu)",
|
||||
pString->length, MAXLEN);
|
||||
pString->length, AI_MAXLEN);
|
||||
}
|
||||
const char *sz = pString->data;
|
||||
while (true) {
|
||||
@@ -920,7 +920,7 @@ void ValidateDSProcess::Validate(const aiString *pString) {
|
||||
ReportError("aiString::data is invalid: the terminal zero is at a wrong offset");
|
||||
}
|
||||
break;
|
||||
} else if (sz >= &pString->data[MAXLEN]) {
|
||||
} else if (sz >= &pString->data[AI_MAXLEN]) {
|
||||
ReportError("aiString::data is invalid. There is no terminal character");
|
||||
}
|
||||
++sz;
|
||||
|
||||
Reference in New Issue
Block a user