summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/CommandLineArguments.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/CommandLineArguments.cxx')
-rw-r--r--Source/kwsys/CommandLineArguments.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx
index 7296ed3..d01c3bf 100644
--- a/Source/kwsys/CommandLineArguments.cxx
+++ b/Source/kwsys/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();