diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-12 02:34:39 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-12 02:34:39 -0400 |
commit | 6f2e3b88649543d625b76ac5542dd8838b28f0b1 (patch) | |
tree | af76d46718d4b2b3e51c05c3c53a09987505f02f /src/balance.cc | |
parent | 9c9320bc586bc80922921945bfe6bb704c36c624 (diff) | |
download | fork-ledger-6f2e3b88649543d625b76ac5542dd8838b28f0b1.tar.gz fork-ledger-6f2e3b88649543d625b76ac5542dd8838b28f0b1.tar.bz2 fork-ledger-6f2e3b88649543d625b76ac5542dd8838b28f0b1.zip |
Properly handle UTF-8 characters in commodity strings.
Diffstat (limited to 'src/balance.cc')
-rw-r--r-- | src/balance.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/balance.cc b/src/balance.cc index c9ca148d..7f8ed572 100644 --- a/src/balance.cc +++ b/src/balance.cc @@ -240,17 +240,11 @@ void balance_t::print(std::ostream& out, first = false; width = first_width; } - - out.width(width); - out.fill(' '); - out << std::right << *amount; + amount->right_justify(out, width); } - if (first) { - out.width(first_width); - out.fill(' '); - out << std::right << "0"; - } + if (first) + amount_t(0L).right_justify(out, first_width); } } // namespace ledger |