Fix a regression in handling digit separators (#1782)

This commit is contained in:
Victor Zverovich
2020-07-18 08:31:38 -07:00
parent 89d0c7124b
commit 2b7a146fa1
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -1559,7 +1559,7 @@ template <typename OutputIt, typename Char, typename UInt> struct int_writer {
int num_digits = count_digits(abs_value);
int size = num_digits, n = num_digits;
std::string::const_iterator group = groups.cbegin();
while (group != groups.cend() && num_digits > *group && *group > 0 &&
while (group != groups.cend() && n > *group && *group > 0 &&
*group != max_value<char>()) {
size += sep_size;
n -= *group;