From 93e7bac668ad14c1f99f2a083af50eb5d4f69c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Basg=C3=B6ze?= Date: Sat, 2 May 2020 01:56:36 +0200 Subject: [PATCH] Fix bitshift overflow --- src/storm/utility/bitoperations.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storm/utility/bitoperations.h b/src/storm/utility/bitoperations.h index 5162562d0..079ead0e1 100644 --- a/src/storm/utility/bitoperations.h +++ b/src/storm/utility/bitoperations.h @@ -9,7 +9,7 @@ inline uint64_t smallestIntWithNBitsSet(uint64_t n) { STORM_LOG_ASSERT(n < 64, "Input is too large."); if (n == 0) return 0; - return (1 << n) - 1; + return (1ul << n) - 1; } /**