From 110a23d2f06565204e509b60b0bc28d5ef61a2ae Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 15 Feb 2006 20:46:07 +0000 Subject: Added in.clear() before resetting I/Os streams. Again, thanks to the list. --- binary.cc | 1 + gnucash.cc | 1 + ofx.cc | 4 ++++ qif.cc | 1 + textual.cc | 1 + xml.cc | 3 +++ 6 files changed, 11 insertions(+) diff --git a/binary.cc b/binary.cc index 367e4e75..4953cf7e 100644 --- a/binary.cc +++ b/binary.cc @@ -489,6 +489,7 @@ bool binary_parser_t::test(std::istream& in) const read_binary_number(in) == format_version) return true; + in.clear(); in.seekg(0, std::ios::beg); return false; } diff --git a/gnucash.cc b/gnucash.cc index 49e12117..02e5b477 100644 --- a/gnucash.cc +++ b/gnucash.cc @@ -345,6 +345,7 @@ bool gnucash_parser_t::test(std::istream& in) const { char buf[5]; in.read(buf, 5); + in.clear(); in.seekg(0, std::ios::beg); return std::strncmp(buf, "