(test): Check for <?xml only, not the full version string.
This commit is contained in:
parent
dc4c2b8d50
commit
1895ae6653
1 changed files with 1 additions and 1 deletions
2
xml.cc
2
xml.cc
|
|
@ -137,7 +137,7 @@ bool xml_parser_t::test(std::istream& in) const
|
|||
char buf[256];
|
||||
|
||||
in.getline(buf, 255);
|
||||
if (std::strncmp(buf, "<?xml version=\"1.0\"?>", 21) != 0) {
|
||||
if (std::strncmp(buf, "<?xml", 5) != 0) {
|
||||
in.seekg(0, std::ios::beg);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue