1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-27 18:50:07 +03:00

schemas: Fix line numbers in streaming validation

This commit is contained in:
Nick Wellnhofer 2023-04-30 21:24:50 +02:00
parent 57d88da675
commit 165f3436fc

View File

@ -2143,8 +2143,14 @@ xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt,
(vctxt->parserCtxt != NULL) &&
(vctxt->parserCtxt->input != NULL)) {
file = vctxt->parserCtxt->input->filename;
line = vctxt->parserCtxt->input->line;
col = vctxt->parserCtxt->input->col;
if (vctxt->inode != NULL) {
line = vctxt->inode->nodeLine;
col = 0;
} else {
/* This is inaccurate. */
line = vctxt->parserCtxt->input->line;
col = vctxt->parserCtxt->input->col;
}
}
} else {
/*