diff options
author | Your Name <you@example.com> | 2022-01-22 11:25:31 -0500 |
---|---|---|
committer | Your Name <you@example.com> | 2022-01-22 11:25:31 -0500 |
commit | 07da526d1263467dd87ca4e5a7bcfefda555f741 (patch) | |
tree | 5ac41a900a3bd930259fe60ff1ce998e36ef210e | |
parent | b8a4092aaa48d00d88765021a82d5f396ba08f0f (diff) | |
download | libbible-07da526d1263467dd87ca4e5a7bcfefda555f741.tar.gz libbible-07da526d1263467dd87ca4e5a7bcfefda555f741.tar.bz2 libbible-07da526d1263467dd87ca4e5a7bcfefda555f741.zip |
Does not contain blank languages
-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; } |