summaryrefslogtreecommitdiff
path: root/src/csv.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-05-15 00:22:00 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-05-15 00:22:00 -0600
commit72dd4d85bdd1f6da79dee405366311e6da96776b (patch)
treee3e0a0d6bb7bec06505965da4e845e12bbc63971 /src/csv.cc
parent64a9b42381c26baf24e58b40f50f0b253e551811 (diff)
parent96172669053bbba7263a370f109f70615049a0c6 (diff)
downloadfork-ledger-72dd4d85bdd1f6da79dee405366311e6da96776b.tar.gz
fork-ledger-72dd4d85bdd1f6da79dee405366311e6da96776b.tar.bz2
fork-ledger-72dd4d85bdd1f6da79dee405366311e6da96776b.zip
Merge branch 'release/v3.0.0-20120510'
Diffstat (limited to 'src/csv.cc')
-rw-r--r--src/csv.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/csv.cc b/src/csv.cc
index 1e55129e..71b6516a 100644
--- a/src/csv.cc
+++ b/src/csv.cc
@@ -87,7 +87,7 @@ char * csv_reader::next_line(std::istream& in)
while (in.good() && ! in.eof() && in.peek() == '#')
in.getline(context.linebuf, parse_context_t::MAX_LINE);
- if (! in.good() || in.eof())
+ if (! in.good() || in.eof() || in.peek() == -1)
return NULL;
in.getline(context.linebuf, parse_context_t::MAX_LINE);