diff options
author | John Wiegley <johnw@newartisans.com> | 2009-06-16 17:05:28 +0100 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-06-16 17:05:28 +0100 |
commit | 94467e5b7f6b88580a443d494293acc044a17d54 (patch) | |
tree | 72374545ea0453d8926bde7341e34efa1bb896cb /src | |
parent | 298a4faef371cae8f308c0b729a1a34ea7aa927c (diff) | |
download | fork-ledger-94467e5b7f6b88580a443d494293acc044a17d54.tar.gz fork-ledger-94467e5b7f6b88580a443d494293acc044a17d54.tar.bz2 fork-ledger-94467e5b7f6b88580a443d494293acc044a17d54.zip |
Fixed a problem with accounts and trailing spaces
This issue is caused by having a single space at the end of a posting
that has neither an amount nor a note.
Fixes C523E23F-CFAC-4A53-B0C6-21226640E763
Diffstat (limited to 'src')
-rw-r--r-- | src/textual.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/textual.cc b/src/textual.cc index 5a47b75a..f2996a03 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -863,6 +863,9 @@ post_t * instance_t::parse_post(char * line, char * next = next_element(p, true); char * e = p + std::strlen(p); + while (e > p && std::isspace(*(e - 1))) + e--; + if ((*p == '[' && *(e - 1) == ']') || (*p == '(' && *(e - 1) == ')')) { post->add_flags(POST_VIRTUAL); DEBUG("textual.parse", "line " << linenum << ": " |