summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2014-12-11 21:57:25 +0100
committerAdrian Lang <mail@adrianlang.de>2014-12-11 21:57:25 +0100
commita013a73b26f2274152ebf7f0ba7af17c2e17a4c8 (patch)
tree49d55bc15cc435ab376b0ba6d2ce5cc92161228a /src/textual.cc
parentb960eec5201044a07154262a0d51829904ec8e98 (diff)
downloadfork-ledger-a013a73b26f2274152ebf7f0ba7af17c2e17a4c8.tar.gz
fork-ledger-a013a73b26f2274152ebf7f0ba7af17c2e17a4c8.tar.bz2
fork-ledger-a013a73b26f2274152ebf7f0ba7af17c2e17a4c8.zip
Fix off by one error in textual.cc
This fixes parsing of transactions with single-character payees and comments.
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc2
1 files changed, 1 insertions, 1 deletions
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;
}