mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-30 16:21:51 +00:00
Fix signed/unsigned issue with IW3 AssetLoaderGfxImage
This commit is contained in:
@ -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));
|
||||||
|
Reference in New Issue
Block a user