Browse Source

Fix bitshift overflow

tempestpy_adaptions
Daniel Basgöze 5 years ago
parent
commit
93e7bac668
  1. 2
      src/storm/utility/bitoperations.h

2
src/storm/utility/bitoperations.h

@ -9,7 +9,7 @@
inline uint64_t smallestIntWithNBitsSet(uint64_t n) { inline uint64_t smallestIntWithNBitsSet(uint64_t n) {
STORM_LOG_ASSERT(n < 64, "Input is too large."); STORM_LOG_ASSERT(n < 64, "Input is too large.");
if (n == 0) return 0; if (n == 0) return 0;
return (1 << n) - 1;
return (1ul << n) - 1;
} }
/** /**

Loading…
Cancel
Save