From: Sadie Powell Date: Tue, 3 Nov 2020 15:58:59 +0000 (+0000) Subject: Fix an off by one error in the "unknown option" message. X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=d76f856fc9d97af68c9cbad0aca9d5505506b4d9;p=user%2Fhenk%2Fcode%2Finspircd.git Fix an off by one error in the "unknown option" message. --- diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 067b2a2f3..5760e631b 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -322,7 +322,7 @@ namespace default: // An unknown option was specified. - std::cout << con_red << "Error:" << con_reset << " unknown option '" << argv[optind - 1] << "'." << std::endl + std::cout << con_red << "Error:" << con_reset << " unknown option '" << argv[optind] << "'." << std::endl << con_bright << "Usage: " << con_reset << argv[0] << " [--config ] [--debug] [--nofork] [--nolog]" << std::endl << std::string(strlen(argv[0]) + 8, ' ') << "[--nopid] [--runasroot] [--version]" << std::endl; ServerInstance->Exit(EXIT_STATUS_ARGV);