Fix signed/unsigned issue with IW3 AssetLoaderGfxImage

This commit is contained in:
Jan 2021-07-31 12:57:18 +02:00
parent e324c20641
commit 2c96bc5ef8

View File

@ -95,7 +95,7 @@ bool AssetLoaderGfxImage::LoadFromRaw(const std::string& assetName, ISearchPath*
const auto faceCount = texture->GetFaceCount(); const auto faceCount = texture->GetFaceCount();
size_t dataSize = 0; size_t dataSize = 0;
for (auto mipLevel = 0u; mipLevel < mipCount; mipLevel++) for (auto mipLevel = 0; mipLevel < mipCount; mipLevel++)
dataSize += texture->GetSizeOfMipLevel(mipLevel) * faceCount; dataSize += texture->GetSizeOfMipLevel(mipLevel) * faceCount;
auto* loadDef = static_cast<GfxImageLoadDef*>(zone->GetMemory()->Alloc(offsetof(GfxImageLoadDef, data) + dataSize)); auto* loadDef = static_cast<GfxImageLoadDef*>(zone->GetMemory()->Alloc(offsetof(GfxImageLoadDef, data) + dataSize));