aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mods.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/mods.cc b/mods.cc
index 708f3f1..ab54e48 100644
--- a/mods.cc
+++ b/mods.cc
@@ -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;
}