diff options
| author | Jeremy Rimpo <jrim@rimpo.org> | 2017-12-17 21:33:04 -0600 |
|---|---|---|
| committer | Jeremy Rimpo <jrim@rimpo.org> | 2017-12-17 21:33:04 -0600 |
| commit | 385a888c0bc8e5b4d4a6791e46eed3b5963c403a (patch) | |
| tree | 276eb064a25143f9f8fb61206de08f90cf4f43fd /src/modinfo.cpp | |
| parent | 7b45d807d6c2c8b5663ec53183e81e16a5baf739 (diff) | |
Implement file priority for loose files > archives
Diffstat (limited to 'src/modinfo.cpp')
| -rw-r--r-- | src/modinfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index d3687d31..c14eedb7 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -123,9 +123,10 @@ ModInfo::Ptr ModInfo::getByIndex(unsigned int index) { QMutexLocker locker(&s_Mutex); - if (index >= s_Collection.size()) { + if (index >= s_Collection.size() && index != ULONG_MAX) { throw MyException(tr("invalid mod index %1").arg(index)); } + if (index == ULONG_MAX) return s_Collection[ModInfo::getIndex("Overwrite")]; return s_Collection[index]; } |
