summaryrefslogtreecommitdiff
path: root/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-12-08 05:21:30 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:40:48 -0400
commitb02c7ef8aad04e910c228ba8eadaf8a85283cc52 (patch)
tree89d2bccc94978ee5b994e032f2c0541f0fc47a2b /textual.cc
parentaa3101f7ed432fce999383f64df62a00ed713884 (diff)
downloadfork-ledger-b02c7ef8aad04e910c228ba8eadaf8a85283cc52.tar.gz
fork-ledger-b02c7ef8aad04e910c228ba8eadaf8a85283cc52.tar.bz2
fork-ledger-b02c7ef8aad04e910c228ba8eadaf8a85283cc52.zip
Fixed a textual parsing bug.
Diffstat (limited to 'textual.cc')
-rw-r--r--textual.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/textual.cc b/textual.cc
index 783cc5de..33b7971b 100644
--- a/textual.cc
+++ b/textual.cc
@@ -134,6 +134,10 @@ transaction_t * parse_transaction(char * line, account_t * account)
}
}
+ char * q = p + std::strlen(p) - 1;
+ while (q >= p && std::isspace(*q))
+ *q-- = '\0';
+
if (*p == '[' || *p == '(') {
xact->flags |= TRANSACTION_VIRTUAL;
if (*p == '[')