From 67207e20f3dc8b9e92e45560776b5b304f964cc1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 7 Nov 2020 07:56:08 -0500 Subject: Fixed segfaults for invalid module names --- bible.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bible.cc') 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= list bible versions available for download and install. Default lists for all languages.\n"); printf(" --install-network install module from the network where is LANG:NAME as provided by --list-installable\n"); printf(" --install-zip install module from a zip file\n"); - printf(" --remove-mod delete a mod from the system\n"); + printf(" --remove-module 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> 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; -- cgit v1.2.3