aboutsummaryrefslogtreecommitdiff
path: root/bible.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2020-11-07 07:56:08 -0500
committerYour Name <you@example.com>2020-11-07 07:56:08 -0500
commit67207e20f3dc8b9e92e45560776b5b304f964cc1 (patch)
tree1c766f0869194b2ae0adf4b57d7470140a3a5d6c /bible.cc
parent44f16b6cd5b9cd9641c0c5df1c671c9e610ad7ac (diff)
downloadlibbible-67207e20f3dc8b9e92e45560776b5b304f964cc1.tar.gz
libbible-67207e20f3dc8b9e92e45560776b5b304f964cc1.tar.bz2
libbible-67207e20f3dc8b9e92e45560776b5b304f964cc1.zip
Fixed segfaults for invalid module names
Diffstat (limited to 'bible.cc')
-rw-r--r--bible.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/bible.cc b/bible.cc
index b0e3ed3..3388364 100644
--- a/bible.cc
+++ b/bible.cc
@@ -19,7 +19,7 @@ void usage() {
printf(" --list-installable=<lang> list bible versions available for download and install. Default lists for all languages.\n");
printf(" --install-network <mod> install module from the network where <mod> is LANG:NAME as provided by --list-installable\n");
printf(" --install-zip <path> install module from a zip file\n");
- printf(" --remove-mod <mod> delete a mod from the system\n");
+ printf(" --remove-module <mod> delete a module from the system\n");
printf("\n\nExamples:\n bible Gal 5:22-23\n");
printf(" bible John 3:16\n bible Romans 12\n bible Matt 5:3-7:27\n");
printf(" bible Genesis 1-3\n");
@@ -49,7 +49,7 @@ void setDefaultModule(string modname) {
void listBooks(string modname) {
map<string, vector<string>> mods = libbible::getModules();
if(mods.find(modname) == mods.end()) {
- printf("ERROR: Module \"%s\" not installed!", modname.c_str());
+ printf("ERROR: Module \"%s\" not installed!\n", modname.c_str());
} else {
printf("Books in Module %s:\n", modname.c_str());
for(string book : mods[modname]) {
@@ -113,7 +113,7 @@ int main(int argc, char* argv[]) {
{"list-installable", optional_argument, 0, 0},
{"install-network", required_argument, 0, 0},
{"install-zip", required_argument, 0, 0},
- {"remove-mod", required_argument, 0, 0}
+ {"remove-module", required_argument, 0, 0}
};
int opt, option_index;
string modname;
@@ -153,7 +153,7 @@ int main(int argc, char* argv[]) {
installNetwork(string(optarg));
} else if(option == "install-zip") {
installZip(string(optarg));
- } else if(option == "remove-mod") {
+ } else if(option == "remove-module") {
removeMod(string(optarg));
}
break;