- Uses mk_wcwidth to calculate the printed width of a character in a date
  format that is not recognized, instead of simply assuming '1'.
This commit is contained in:
Paul Beckingham 2014-06-15 22:31:13 -04:00
parent ea2405330f
commit cfb7fdc987

View file

@ -553,8 +553,8 @@ int Date::length (const std::string& format)
case 'A':
case 'B': total += 10; break;
// TODO This should be a calculated character width, not necessarily 1.
default: total += 1; break;
// Calculate the width, don't assume a single character width.
default: total += mk_wcwidth (*i); break;
}
}