1
0
mirror of synced 2025-01-25 15:53:43 +01:00

fix: Build issue on systems where size_t is not u64

This commit is contained in:
WerWolv 2024-12-06 22:03:12 +01:00
parent 2b715bb0de
commit d02e170dac

View File

@ -456,7 +456,7 @@ namespace hex::plugin::builtin {
constexpr static auto BatchFillSize = 1_MiB;
std::vector<u8> batchData;
if (bytes.size() < BatchFillSize) {
batchData.resize(std::min(alignTo(BatchFillSize, bytes.size()), size));
batchData.resize(std::min<u64>(alignTo<u64>(BatchFillSize, bytes.size()), size));
for (u64 i = 0; i < batchData.size(); i += bytes.size()) {
auto remainingSize = std::min<size_t>(batchData.size() - i, bytes.size());
std::copy_n(bytes.begin(), remainingSize, batchData.begin() + i);