From fd2d862fbc4d13129bfa3702a9241d9ea46ddae5 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 17 Aug 2015 12:05:47 -0400 Subject: [PATCH] Make limited map actually respect max size --- src/limitedmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/limitedmap.h b/src/limitedmap.h index e8ea549653..b990eab3ee 100644 --- a/src/limitedmap.h +++ b/src/limitedmap.h @@ -38,7 +38,7 @@ public: { std::pair ret = map.insert(x); if (ret.second) { - if (nMaxSize && map.size() == nMaxSize) { + if (nMaxSize && map.size() > nMaxSize) { map.erase(rmap.begin()->second); rmap.erase(rmap.begin()); }