summaryrefslogtreecommitdiff
path: root/xml.cc
diff options
context:
space:
mode:
Diffstat (limited to 'xml.cc')
-rw-r--r--xml.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/xml.cc b/xml.cc
index 4bebbf44..380416ed 100644
--- a/xml.cc
+++ b/xml.cc
@@ -158,16 +158,19 @@ bool xml_parser_t::test(std::istream& in) const
in.getline(buf, 79);
if (std::strncmp(buf, "<?xml", 5) != 0) {
+ in.clear();
in.seekg(0, std::ios::beg);
return false;
}
in.getline(buf, 79);
if (! std::strstr(buf, "<ledger")) {
+ in.clear();
in.seekg(0, std::ios::beg);
return false;
}
+ in.clear();
in.seekg(0, std::ios::beg);
return true;
}