Fix iwiwriter8 using size of header for iwi27

This commit is contained in:
Jan 2021-04-02 18:13:47 +02:00
parent 1cc5be2f64
commit 8fbda2d1bb

View File

@ -106,7 +106,7 @@ void IwiWriter::DumpImage(std::ostream& stream, Texture* texture)
const auto mipLevelSize = texture->GetSizeOfMipLevel(currentMipLevel) * texture->GetFaceCount(); const auto mipLevelSize = texture->GetSizeOfMipLevel(currentMipLevel) * texture->GetFaceCount();
currentFileSize += mipLevelSize; currentFileSize += mipLevelSize;
if (currentMipLevel < static_cast<int>(std::extent<decltype(iwi27::IwiHeader::fileSizeForPicmip)>::value)) if (currentMipLevel < static_cast<int>(std::extent<decltype(IwiHeader::fileSizeForPicmip)>::value))
header.fileSizeForPicmip[currentMipLevel] = currentFileSize; header.fileSizeForPicmip[currentMipLevel] = currentFileSize;
} }