diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-11 12:56:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-11 12:56:16 +0200 |
commit | f0fe82442f2ab1ca7745d983f828aba0734255aa (patch) | |
tree | 9c4c8185f4f99e6acd920129b899a15c08b3b05c /cli/parser.cxx | |
parent | aa33636c20b65dbf87e2189dc3d8759b883e7909 (diff) |
Fix bug in trailing space handling in documentation strings
Diffstat (limited to 'cli/parser.cxx')
-rw-r--r-- | cli/parser.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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; } } } |