Fix off by one error in textual.cc

This fixes parsing of transactions with single-character payees and comments.
This commit is contained in:
Adrian Lang 2014-12-11 21:57:25 +01:00
parent b960eec520
commit a013a73b26

View file

@ -1816,7 +1816,7 @@ xact_t * instance_t::parse_xact(char * line,
char *q = p - 1; char *q = p - 1;
while (q > next && std::isspace(*q)) while (q > next && std::isspace(*q))
--q; --q;
if (q > next) if (q >= next)
*(q + 1) = '\0'; *(q + 1) = '\0';
break; break;
} }