fix: Some occurrences of undefined behaviour

This commit is contained in:
WerWolv
2022-08-15 21:08:09 +02:00
parent fb2af5593f
commit 6b62a1963e
2 changed files with 3 additions and 3 deletions

View File

@@ -68,7 +68,7 @@ namespace hex {
}
constexpr inline i128 signExtend(size_t numBits, i128 value) {
i128 mask = 1U << (numBits - 1);
i128 mask = 1ULL << (numBits - 1);
return (value ^ mask) - mask;
}