fix: Build error due to size_t not being u64 on macOS

This commit is contained in:
Nik
2025-12-02 08:08:19 +01:00
committed by GitHub
parent 0e5136196a
commit d15b7862b8

View File

@@ -568,7 +568,7 @@ namespace hex::plugin::builtin {
std::string value, copyValue;
if (currSelection.has_value()) {
std::wstring stringBuffer(std::min<size_t>(alignTo(currSelection->size, sizeof(wchar_t)), 0x1000), 0x00);
std::wstring stringBuffer(std::min<size_t>(alignTo<size_t>(currSelection->size, sizeof(wchar_t)), 0x1000), 0x00);
ImHexApi::Provider::get()->read(currSelection->address, stringBuffer.data(), stringBuffer.size());
for (auto &c : stringBuffer)
@@ -605,7 +605,7 @@ namespace hex::plugin::builtin {
std::string value, copyValue;
if (currSelection.has_value()) {
std::u16string stringBuffer(std::min<size_t>(alignTo(currSelection->size, sizeof(char16_t)), 0x1000), 0x00);
std::u16string stringBuffer(std::min<size_t>(alignTo<size_t>(currSelection->size, sizeof(char16_t)), 0x1000), 0x00);
ImHexApi::Provider::get()->read(currSelection->address, stringBuffer.data(), stringBuffer.size());
for (auto &c : stringBuffer)
@@ -642,7 +642,7 @@ namespace hex::plugin::builtin {
std::string value, copyValue;
if (currSelection.has_value()) {
std::u32string stringBuffer(std::min<size_t>(alignTo(currSelection->size, sizeof(char32_t)), 0x1000), 0x00);
std::u32string stringBuffer(std::min<size_t>(alignTo<size_t>(currSelection->size, sizeof(char32_t)), 0x1000), 0x00);
ImHexApi::Provider::get()->read(currSelection->address, stringBuffer.data(), stringBuffer.size());
for (auto &c : stringBuffer)