fix(serialize-xml): fetch correct name from pathNames in endTag

This commit is contained in:
Johannes Frohnmeyer 2024-04-13 20:09:10 +02:00
parent b004c00fcf
commit dbf5d51343
Signed by: Johannes
GPG Key ID: E76429612C2929F4

View File

@ -168,9 +168,9 @@ public class BaseXmlReader implements Closeable {
}
pos++;
} else if (p == PEEKED_END_TAG_CONCISE) {
name = pathNames[stackSize - 1];
name = pathNames[stackSize - 2];
} else throw unexpectedTokenError("END_TAG");
if (!name.equals(pathNames[stackSize - 1])) {
if (!name.equals(pathNames[stackSize - 2])) {
if (!lenient) throw syntaxError("Mismatched closing tag: Expected " + pathNames[stackSize - 1] + " but was " + name);
}
stackSize--;