From 07da526d1263467dd87ca4e5a7bcfefda555f741 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 22 Jan 2022 11:25:31 -0500 Subject: Does not contain blank languages --- mods.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mods.cc') diff --git a/mods.cc b/mods.cc index 708f3f1..ab54e48 100644 --- a/mods.cc +++ b/mods.cc @@ -118,11 +118,12 @@ map> 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; } -- cgit v1.2.3