Skip to content

Commit

Permalink
Fix buffer size.
Browse files Browse the repository at this point in the history
  • Loading branch information
gonetz committed Mar 17, 2024
1 parent f5237a1 commit 45c140b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GLideNHQ/TxUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ TxUtil::StrongCRC32(const uint8* src, int width, int height, int size, int rowSt
const uint32 bytesPerLine = width << size >> 1;

u64 crc = UINT64_MAX;
std::vector<uint8> buf(height*rowStride);
std::vector<uint8> buf(static_cast<uint32>(height) * std::max(bytesPerLine, static_cast<uint32>(rowStride)));
uint8* pData = buf.data();
try {
for (int y = 0; y < height; ++y) {
Expand Down

0 comments on commit 45c140b

Please sign in to comment.