diff --git a/src/storm/storage/BitVector.cpp b/src/storm/storage/BitVector.cpp index 18ac1feb3..616d2b424 100644 --- a/src/storm/storage/BitVector.cpp +++ b/src/storm/storage/BitVector.cpp @@ -566,6 +566,9 @@ namespace storm { } bool BitVector::full() const { + if (bitCount == 0) { + return true; + } // Check that all buckets except the last one have all bits set. uint64_t* last = buckets + bucketCount() - 1; for (uint64_t const* it = buckets; it < last; ++it) { diff --git a/src/storm/storage/BitVector.h b/src/storm/storage/BitVector.h index 89d6ccad2..6fd4a79aa 100644 --- a/src/storm/storage/BitVector.h +++ b/src/storm/storage/BitVector.h @@ -417,6 +417,7 @@ namespace storm { /*! * Retrievs whether all bits are set in this bit vector. + * If the bit vector has size 0, this method always returns true. * * @return True iff all bits in the bit vector are set. */