diff --git a/CommandLineArguments.cxx b/CommandLineArguments.cxx index 860b7912ea51b3672b66fa52b3b8b311c0b7845b..00f28c4dcad92ebf5309433a488ce61d65d4fc3e 100644 --- a/CommandLineArguments.cxx +++ b/CommandLineArguments.cxx @@ -550,12 +550,11 @@ void CommandLineArguments::GenerateHelp() } } - maxlen += 2; // For the space after option - // Create format for that string char format[80]; - sprintf(format, "%%%ds ", static_cast<unsigned int>(maxlen-2)); + sprintf(format, " %%-%ds ", static_cast<unsigned int>(maxlen)); + maxlen += 4; // For the space before and after the option // Print help for each option for ( mpit = mp.begin();