diff options
author | John Wiegley <johnw@newartisans.com> | 2012-05-14 21:37:36 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-05-14 21:41:38 -0600 |
commit | 96172669053bbba7263a370f109f70615049a0c6 (patch) | |
tree | e3e0a0d6bb7bec06505965da4e845e12bbc63971 /src/csv.cc | |
parent | 32eaa0346959188a030cd217ec02b02040efeb26 (diff) | |
download | fork-ledger-96172669053bbba7263a370f109f70615049a0c6.tar.gz fork-ledger-96172669053bbba7263a370f109f70615049a0c6.tar.bz2 fork-ledger-96172669053bbba7263a370f109f70615049a0c6.zip |
Improved detection of iostream's eof() condition
Diffstat (limited to 'src/csv.cc')
-rw-r--r-- | src/csv.cc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |