From 7ea9454614c84f16077287a28ee47c1106114d75 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 20 Oct 2016 21:00:27 +0200 Subject: [PATCH] * spot/misc/bitvect.hh (is_subset_of): Fix implementation. --- spot/misc/bitvect.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spot/misc/bitvect.hh b/spot/misc/bitvect.hh index 68ce81548..5ef490193 100644 --- a/spot/misc/bitvect.hh +++ b/spot/misc/bitvect.hh @@ -311,7 +311,7 @@ namespace spot const size_t bpb = 8 * sizeof(bitvect::block_t); size_t rest = size() % bpb; for (i = 0; i < block_count_ - !!rest; ++i) - if ((storage_[i] & other.storage_[i]) != other.storage_[i]) + if ((storage_[i] & other.storage_[i]) != storage_[i]) return false; if (!rest) return true; @@ -320,7 +320,7 @@ namespace spot // relevant portion. block_t mask = (1UL << rest) - 1; return ((storage_[i] & mask & other.storage_[i]) - == (other.storage_[i] & mask)); + == (storage_[i] & mask)); } bool operator==(const bitvect& other) const