Merge pull request #22 from lachs0r/master

Fix crash in block cache aging
This commit is contained in:
Thomas Goyne 2014-11-11 21:32:46 -08:00
commit 2e7d70edf3

View file

@ -98,7 +98,7 @@ class DataBlockCache {
return;
auto& ba = mb.blocks;
size += (ba.size() - std::count(ba.begin(), ba.end(), nullptr)) * factory.GetBlockSize();
size -= (ba.size() - std::count(ba.begin(), ba.end(), nullptr)) * factory.GetBlockSize();
ba.clear();
age.erase(mb.position);