Patch from Nathan Jones so that trailing whitespace after account names in a

transaction with no amount is not parsed as a special name.  Fixes #3.
This commit is contained in:
John Wiegley 2008-07-16 03:54:50 -04:00
parent 0e54ef9c08
commit f3b182ca80

View file

@ -139,7 +139,8 @@ transaction_t * parse_transaction(char * line, account_t * account,
while (! in.eof()) {
in.get(p);
if (in.eof() || (std::isspace(p) &&
(p == '\t' || std::isspace(in.peek()))))
(p == '\t' || in.peek() == EOF ||
std::isspace(in.peek()))))
break;
account_end++;
}