Fix off-by-one error in MRU::GetEntry

Originally committed to SVN as r6009.
This commit is contained in:
Thomas Goyne 2011-12-22 21:11:01 +00:00
parent d0ee3029de
commit ef3414931f
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ const MRUManager::MRUListMap* MRUManager::Get(const std::string &key) {
std::string const& MRUManager::GetEntry(const std::string &key, size_t entry) {
const MRUManager::MRUListMap *map = Get(key);
if (entry > map->size())
if (entry >= map->size())
throw MRUErrorIndexOutOfRange("Requested element index is out of range.");
MRUListMap::const_iterator index = map->begin();