Fix size(), now linked blocks also count toward the total count.
This commit is contained in:
parent
bf6814df20
commit
2352bfddc1
1 changed files with 3 additions and 1 deletions
|
@ -62,7 +62,9 @@ std::size_t MemoryCard::size() const {
|
|||
return std::count_if(
|
||||
const_iterator(this, 0),
|
||||
const_iterator(this, 15),
|
||||
[](const auto& blk) {return blk.has_magic();}
|
||||
[](const auto& blk) {
|
||||
return (blk.available_blocks() & 0xF) != 0 and (blk.available_blocks() & 0xF) != 0xF;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue