bitvect: fix some issues observed on 32bit architectures.
* src/misc/bitvect.cc, src/misc/bitvect.hh: Do not assume the two bitvect with the same size have the same number of allocated blocks. Fix an assertion in extra_range().
This commit is contained in:
parent
534edd4d1c
commit
522373984c
2 changed files with 35 additions and 14 deletions
|
|
@ -120,7 +120,10 @@ namespace spot
|
|||
|
||||
block_t res = fnv<sizeof(block_t)>::init();
|
||||
size_t i;
|
||||
for (i = 0; i < block_count_ - 1; ++i)
|
||||
size_t m = used_blocks();
|
||||
if (m == 0)
|
||||
return res;
|
||||
for (i = 0; i < m - 1; ++i)
|
||||
{
|
||||
res ^= storage_[i];
|
||||
res *= fnv<sizeof(block_t)>::prime();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue