summaryrefslogtreecommitdiff
path: root/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-19 21:31:36 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-19 21:31:36 -0400
commit8e49f5242f191e9937e09b8d9c4c17b1b2ed971d (patch)
treeaf18dc239083522c4e6d6ba888c7f755bfd85da8 /textual.cc
parent911b86623047bdadd2ac6fde2f8006d9b1c672f8 (diff)
downloadfork-ledger-8e49f5242f191e9937e09b8d9c4c17b1b2ed971d.tar.gz
fork-ledger-8e49f5242f191e9937e09b8d9c4c17b1b2ed971d.tar.bz2
fork-ledger-8e49f5242f191e9937e09b8d9c4c17b1b2ed971d.zip
Erroneously compared a character position to NUL, rather than setting it.
Diffstat (limited to 'textual.cc')
-rw-r--r--textual.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/textual.cc b/textual.cc
index 131c6da2..4e011189 100644
--- a/textual.cc
+++ b/textual.cc
@@ -348,7 +348,7 @@ bool parse_transactions(std::istream& in,
int len = std::strlen(line);
if (line[len - 1] == '\r')
- line[--len] == '\0';
+ line[--len] = '\0';
beg_pos += len + 1;
linenum++;
@@ -444,7 +444,7 @@ entry_t * parse_entry(std::istream& in, char * line, account_t * master,
int len = std::strlen(line);
if (line[len - 1] == '\r')
- line[--len] == '\0';
+ line[--len] = '\0';
end_pos = beg_pos + len + 1;
linenum++;
@@ -631,7 +631,7 @@ unsigned int textual_parser_t::parse(std::istream& in,
int len = std::strlen(line);
if (line[len - 1] == '\r')
- line[--len] == '\0';
+ line[--len] = '\0';
end_pos = beg_pos + len + 1;
linenum++;