From f3c7cd177b85669f4e25a6b3322ce79531adcaa1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 3 Jun 2012 12:04:55 +0200 Subject: Use formatted string when calculating option length --- cli/source.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cli') diff --git a/cli/source.cxx b/cli/source.cxx index 2b976d4..883e49d 100644 --- a/cli/source.cxx +++ b/cli/source.cxx @@ -208,7 +208,7 @@ namespace l++; // ' ' seperator if (doc.size () > 0) - l += doc[0].size (); + l += format (doc[0], ot_plain).size (); else l += 5; // } @@ -267,8 +267,9 @@ namespace if (doc.size () > 0) { - os << escape_str (format (doc[0], ot_plain)); - l += doc[0].size (); + string s (format (doc[0], ot_plain)); + os << escape_str (s); + l += s.size (); } else { -- cgit v1.1