diff options
Diffstat (limited to 'mods.cc')
-rw-r--r-- | mods.cc | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -118,11 +118,12 @@ map<string, vector<string>> libbible::downloadModsAvailable() { } string selected = fulls[0]; for(auto full : fulls) { - if(majVote[full] > majVote[selected] or (majVote[full] == majVote[selected] and full.size() < selected.size())) { + if(majVote[full] > majVote[selected] or (majVote[full] == majVote[selected] and !full.empty() and full.size() < selected.size())) { selected = full; } } - languageNames[abbrev] = selected; + if(selected.empty()) languageNames[abbrev] = abbrev; + else languageNames[abbrev] = selected; } return modsAvailable; } |