1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-15 23:24:06 +03:00

xpath: Only report the first error

Don't overwrite the original error code. Besides, subsequent error
reports are somewhat unreliable and not really useful.
This commit is contained in:
Nick Wellnhofer 2023-01-31 12:58:32 +01:00
parent 6a12be77c6
commit 15c9f43533

View File

@ -712,6 +712,9 @@ xmlXPathErr(xmlXPathParserContextPtr ctxt, int error)
"%s", xmlXPathErrorMessages[error]);
return;
}
/* Only report the first error */
if (ctxt->error != 0)
return;
ctxt->error = error;
if (ctxt->context == NULL) {
__xmlRaiseError(NULL, NULL, NULL,