From a013a73b26f2274152ebf7f0ba7af17c2e17a4c8 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Thu, 11 Dec 2014 21:57:25 +0100 Subject: Fix off by one error in textual.cc This fixes parsing of transactions with single-character payees and comments. --- src/textual.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/textual.cc') diff --git a/src/textual.cc b/src/textual.cc index 156e2b9c..b113c746 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -1816,7 +1816,7 @@ xact_t * instance_t::parse_xact(char * line, char *q = p - 1; while (q > next && std::isspace(*q)) --q; - if (q > next) + if (q >= next) *(q + 1) = '\0'; break; } -- cgit v1.2.3