From f0fe82442f2ab1ca7745d983f828aba0734255aa Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 11 May 2012 12:56:16 +0200 Subject: Fix bug in trailing space handling in documentation strings --- cli/parser.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli') diff --git a/cli/parser.cxx b/cli/parser.cxx index 3f9b19c..d016f19 100644 --- a/cli/parser.cxx +++ b/cli/parser.cxx @@ -788,13 +788,13 @@ option_def (token& t) if (t1.size () != 0) { bool more (true); - size_t b (0), e; + size_t b (0), e, p; while (more) { - e = t1.find ('\n', b); + p = e = t1.find ('\n', b); - if (e == string::npos) + if (p == string::npos) { e = t1.size (); more = false; @@ -814,7 +814,7 @@ option_def (token& t) if (more) { t2 += '\n'; - b = e + 2; + b = p + 1; } } } -- cgit v1.1