diff options
Diffstat (limited to 'TCLAP/tclap/ZshCompletionOutput.h')
-rw-r--r-- | TCLAP/tclap/ZshCompletionOutput.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/TCLAP/tclap/ZshCompletionOutput.h b/TCLAP/tclap/ZshCompletionOutput.h index acf655b..5a9268c 100644 --- a/TCLAP/tclap/ZshCompletionOutput.h +++ b/TCLAP/tclap/ZshCompletionOutput.h @@ -237,8 +237,9 @@ inline void ZshCompletionOutput::printOption(Arg* a, std::string mutex) if ( a->isValueRequired() ) { std::string arg = a->shortID(); - // Example arg: "[-A <integer>] ... " - size_t pos = arg.rfind(" ... "); + // Example arg: "[-A <integer>] ..." + size_t pos = arg.rfind(" ..."); + if (pos != std::string::npos) { arg.erase(pos); } |