Fix size(), now linked blocks also count toward the total count.

This commit is contained in:
King_DuckZ 2020-03-21 23:20:05 +01:00
parent bf6814df20
commit 2352bfddc1

View file

@ -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;
}
);
}