diff --git a/commons-serialize-xml/src/main/java/io/gitlab/jfronny/commons/serialize/xml/NativeXmlReader.java b/commons-serialize-xml/src/main/java/io/gitlab/jfronny/commons/serialize/xml/NativeXmlReader.java index 80a3ad3..04e1d5f 100644 --- a/commons-serialize-xml/src/main/java/io/gitlab/jfronny/commons/serialize/xml/NativeXmlReader.java +++ b/commons-serialize-xml/src/main/java/io/gitlab/jfronny/commons/serialize/xml/NativeXmlReader.java @@ -796,17 +796,13 @@ public class NativeXmlReader implements Closeable { int unused = nextNonWhitespace(true); pos--; - if (pos + 5 > limit && !fillBuffer(5)) { + if (pos + 5 > limit && !fillBuffer(2)) { return; } int p = pos; char[] buf = buffer; - if (buf[p] != '<' - || buf[p + 1] != '?' - || buf[p + 2] != 'x' - || buf[p + 3] != 'm' - || buf[p + 4] != 'l') { + if (buf[p] != '<' || buf[p + 1] != '?') { return; // not a header! }