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

Fix spurious error message

Commit c851970 introduced a spurious error message when evaluating
XPath expressions with xmlXPathCompiledEvalToBoolean.
This commit is contained in:
Nick Wellnhofer 2017-05-27 17:04:12 +02:00
parent aed407c14b
commit a07a4e96d0

View File

@ -14971,8 +14971,9 @@ xmlXPathCompiledEvalInternal(xmlXPathCompExprPtr comp,
} else {
resObj = valuePop(pctxt);
if (resObj == NULL) {
xmlGenericError(xmlGenericErrorContext,
"xmlXPathCompiledEval: No result on the stack.\n");
if (!toBool)
xmlGenericError(xmlGenericErrorContext,
"xmlXPathCompiledEval: No result on the stack.\n");
} else if (pctxt->valueNr > 0) {
xmlGenericError(xmlGenericErrorContext,
"xmlXPathCompiledEval: %d object(s) left on the stack.\n",