From 128d99656fbaff80b7361b8f5d8e1f97289631b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Weing=C3=A4rtner?= Date: Tue, 11 Oct 2016 23:09:27 +0200 Subject: [PATCH 2/2] fixup! improve option_column_width calculation fix off-by-one after ss has the same length as in get_option_column_width() --- src/options_description.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options_description.cpp b/src/options_description.cpp index b145222..0c62a34 100644 --- a/src/options_description.cpp +++ b/src/options_description.cpp @@ -589,7 +589,7 @@ namespace boost { namespace program_options { if (!opt.description().empty()) { - if (ss.str().size() >= first_column_width) + if (ss.str().size() > first_column_width) { os.put('\n'); // first column is too long, lets put description in new line for (unsigned pad = first_column_width; pad > 0; --pad) -- 2.9.3