1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

fixing an XPath function evalutation bug pointed out by Alexey Efimov

* xpath.c: fixing an XPath function evalutation bug pointed out
  by Alexey Efimov where the context was lost when evaluating
  the function arguments
Daniel
This commit is contained in:
Daniel Veillard
2002-05-14 11:03:59 +00:00
parent 79376ba948
commit 088bf11630
2 changed files with 13 additions and 0 deletions

View File

@ -9861,11 +9861,17 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
return (total);
}
case XPATH_OP_ARG:
bakd = ctxt->context->doc;
bak = ctxt->context->node;
if (op->ch1 != -1)
total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
ctxt->context->doc = bakd;
ctxt->context->node = bak;
CHECK_ERROR0;
if (op->ch2 != -1)
total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
ctxt->context->doc = bakd;
ctxt->context->node = bak;
CHECK_ERROR0;
return (total);
case XPATH_OP_PREDICATE: