From 94467e5b7f6b88580a443d494293acc044a17d54 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 16 Jun 2009 17:05:28 +0100 Subject: 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 --- src/textual.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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 << ": " -- cgit v1.2.3