Fix warning

This commit is contained in:
Wojtek Figat
2023-10-04 20:20:35 +02:00
parent b3cef29abc
commit 7777f73c26

View File

@@ -524,7 +524,7 @@ bool ImportMaterialTexture(ImportedModelData& result, AssimpImporterData& data,
{
const aiTexture* aTex = data.Scene->GetEmbeddedTexture(aFilename.C_Str());
const StringView texIndexName(filename.Get() + (ARRAY_COUNT(AI_EMBEDDED_TEXNAME_PREFIX) - 1));
int32 texIndex;
uint32 texIndex;
if (!aTex && !StringUtils::Parse(texIndexName.Get(), texIndexName.Length(), &texIndex) && texIndex >= 0 && texIndex < data.Scene->mNumTextures)
aTex = data.Scene->mTextures[texIndex];
if (aTex && aTex->mHeight == 0 && aTex->mWidth > 0)