Updated places to achFormatHint referencing array size.

This commit is contained in:
Marc-Antoine Lortie
2020-01-23 15:26:49 -05:00
parent 316a8dff4e
commit 770c822621
6 changed files with 11 additions and 6 deletions

View File

@@ -798,7 +798,7 @@ void ValidateDSProcess::Validate( const aiTexture* pTexture)
if (!pTexture->mWidth) {
ReportError("aiTexture::mWidth is zero (compressed texture)");
}
if ('\0' != pTexture->achFormatHint[3]) {
if ('\0' != pTexture->achFormatHint[HINTMAXTEXTURELEN - 1]) {
ReportWarning("aiTexture::achFormatHint must be zero-terminated");
}
else if ('.' == pTexture->achFormatHint[0]) {