diff --git a/plugins/libimhex/include/hex/helpers/utils.hpp b/plugins/libimhex/include/hex/helpers/utils.hpp index 8a1f9e0f2..95f5e1ba8 100644 --- a/plugins/libimhex/include/hex/helpers/utils.hpp +++ b/plugins/libimhex/include/hex/helpers/utils.hpp @@ -116,8 +116,8 @@ namespace hex { } [[nodiscard]] - constexpr uint64_t bitmask(uint8_t bits) { - return (uint64_t(1) << (bits)) - 1; + constexpr u128 bitmask(u8 bits) { + return u128(-1) >> (128 - bits); } template