mirror of https://github.com/odrling/Aegisub
Fix off-by-one error in MRU::GetEntry
Originally committed to SVN as r6009.
This commit is contained in:
parent
d0ee3029de
commit
ef3414931f
|
@ -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 New Issue