fix(serialize-xml): Consume alternate headers as well
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Johannes Frohnmeyer 2024-04-20 21:56:01 +02:00
parent 5c183a79de
commit db632161ca
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 2 additions and 6 deletions

View File

@ -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!
}