From 128d99656fbaff80b7361b8f5d8e1f97289631b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Weing=C3=A4rtner?= <timo@tiwe.de>
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
|
b
|
namespace boost { namespace program_options {
|
589 | 589 | |
590 | 590 | if (!opt.description().empty()) |
591 | 591 | { |
592 | | if (ss.str().size() >= first_column_width) |
| 592 | if (ss.str().size() > first_column_width) |
593 | 593 | { |
594 | 594 | os.put('\n'); // first column is too long, lets put description in new line |
595 | 595 | for (unsigned pad = first_column_width; pad > 0; --pad) |