summaryrefslogtreecommitdiff
path: root/src/balance.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/balance.cc')
-rw-r--r--src/balance.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/balance.cc b/src/balance.cc
index 7f8ed572..92a6c767 100644
--- a/src/balance.cc
+++ b/src/balance.cc
@@ -30,6 +30,7 @@
*/
#include "balance.h"
+#include "unistring.h"
namespace ledger {
@@ -240,11 +241,17 @@ void balance_t::print(std::ostream& out,
first = false;
width = first_width;
}
- amount->right_justify(out, width);
+
+ std::ostringstream buf;
+ buf << *amount;
+ justify(out, buf.str(), width, true);
}
- if (first)
- amount_t(0L).right_justify(out, first_width);
+ if (first) {
+ std::ostringstream buf;
+ buf << amount_t(0L);
+ justify(out, buf.str(), first_width, true);
+ }
}
} // namespace ledger