diff options
Diffstat (limited to 'src/paramproc.cpp')
-rw-r--r-- | src/paramproc.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/paramproc.cpp b/src/paramproc.cpp index 906ec21..a352e66 100644 --- a/src/paramproc.cpp +++ b/src/paramproc.cpp | |||
@@ -446,8 +446,8 @@ int ParamProc::help( int argc, char *argv[] ) | |||
446 | int len=0; | 446 | int len=0; |
447 | for( i = lArg.begin(); i != lArg.end(); i++ ) | 447 | for( i = lArg.begin(); i != lArg.end(); i++ ) |
448 | { | 448 | { |
449 | if( len < (*i)->sWord.getLength() ) | 449 | if( len < (*i)->sWord.getLength() + (*i)->sExtra.getLength() ) |
450 | len = (*i)->sWord.getLength(); | 450 | len = (*i)->sWord.getLength() + (*i)->sExtra.getLength(); |
451 | } | 451 | } |
452 | char fmt[10]; | 452 | char fmt[10]; |
453 | sprintf( fmt, "%%-%ds ", len ); | 453 | sprintf( fmt, "%%-%ds ", len ); |
@@ -481,7 +481,10 @@ int ParamProc::help( int argc, char *argv[] ) | |||
481 | if( (*i)->sWord.getString() ) | 481 | if( (*i)->sWord.getString() ) |
482 | { | 482 | { |
483 | printf("--"); | 483 | printf("--"); |
484 | printf( fmt, (*i)->sWord.getString() ); | 484 | std::string sTmp = (*i)->sWord.getString(); |
485 | if( (*i)->sExtra.getString() ) | ||
486 | sTmp += (*i)->sExtra.getString(); | ||
487 | printf( fmt, sTmp.c_str() ); | ||
485 | } | 488 | } |
486 | else | 489 | else |
487 | { | 490 | { |