forked from mia/Aegisub
Fix off-by-one error in MRU::GetEntry
Originally committed to SVN as r6009.
This commit is contained in:
parent
d0ee3029de
commit
ef3414931f
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue