Skip to content

Commit

Permalink
Merge pull request #5 from TAServers/fix-improper-literals
Browse files Browse the repository at this point in the history
Use unsigned long long literals for getImageSizeBytes in vtf.cpp
  • Loading branch information
Derpius authored Oct 17, 2024
2 parents 882a549 + 3f18dd1 commit d68e57f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vtf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ namespace VtfParser {
size_t size = 0;
for (uint8_t mipLevel = 0; mipLevel < sizeInfo.mipLevels; mipLevel++) {
ImageSizeInfo mipSizeInfo = sizeInfo;
mipSizeInfo.width = std::max(sizeInfo.width >> mipLevel, 1ul);
mipSizeInfo.height = std::max(sizeInfo.height >> mipLevel, 1ul);
mipSizeInfo.depth = std::max(sizeInfo.depth >> mipLevel, 1ul);
mipSizeInfo.width = std::max(sizeInfo.width >> mipLevel, 1ull);
mipSizeInfo.height = std::max(sizeInfo.height >> mipLevel, 1ull);
mipSizeInfo.depth = std::max(sizeInfo.depth >> mipLevel, 1ull);
size += getMipSizeBytes(mipSizeInfo);
}

Expand Down

0 comments on commit d68e57f

Please sign in to comment.