mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-28 00:21:53 +03:00
real fix for bug #78858
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
|
Tue 07 May 2002 09:20:21 AM PDT Aleksey Sanin <aleksey@aleksey.com>
|
||||||
|
* xpath.c: fixed bug #78858 (the real fix)
|
||||||
|
|
||||||
Sat 04 May 2002 11:56:31 PM PDT Aleksey Sanin <aleksey@aleksey.com>
|
Sat 04 May 2002 11:56:31 PM PDT Aleksey Sanin <aleksey@aleksey.com>
|
||||||
* xpath.c: fixed bug #78858
|
* xpath.c: fixed bug #78858 (quick and durty fix to hide the problem)
|
||||||
|
|
||||||
Sun May 5 08:57:08 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
Sun May 5 08:57:08 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
11
xpath.c
11
xpath.c
@ -7394,6 +7394,7 @@ xmlXPathCompFunctionCall(xmlXPathParserContextPtr ctxt) {
|
|||||||
int op1 = ctxt->comp->last;
|
int op1 = ctxt->comp->last;
|
||||||
ctxt->comp->last = -1;
|
ctxt->comp->last = -1;
|
||||||
xmlXPathCompileExpr(ctxt);
|
xmlXPathCompileExpr(ctxt);
|
||||||
|
CHECK_ERROR;
|
||||||
PUSH_BINARY_EXPR(XPATH_OP_ARG, op1, ctxt->comp->last, 0, 0);
|
PUSH_BINARY_EXPR(XPATH_OP_ARG, op1, ctxt->comp->last, 0, 0);
|
||||||
nbargs++;
|
nbargs++;
|
||||||
if (CUR == ')') break;
|
if (CUR == ')') break;
|
||||||
@ -7429,6 +7430,7 @@ xmlXPathCompPrimaryExpr(xmlXPathParserContextPtr ctxt) {
|
|||||||
NEXT;
|
NEXT;
|
||||||
SKIP_BLANKS;
|
SKIP_BLANKS;
|
||||||
xmlXPathCompileExpr(ctxt);
|
xmlXPathCompileExpr(ctxt);
|
||||||
|
CHECK_ERROR;
|
||||||
if (CUR != ')') {
|
if (CUR != ')') {
|
||||||
XP_ERROR(XPATH_EXPR_ERROR);
|
XP_ERROR(XPATH_EXPR_ERROR);
|
||||||
}
|
}
|
||||||
@ -10335,8 +10337,14 @@ xmlXPathCompile(const xmlChar *str) {
|
|||||||
|
|
||||||
ctxt = xmlXPathNewParserContext(str, NULL);
|
ctxt = xmlXPathNewParserContext(str, NULL);
|
||||||
xmlXPathCompileExpr(ctxt);
|
xmlXPathCompileExpr(ctxt);
|
||||||
|
|
||||||
if (*ctxt->cur != 0) {
|
if (*ctxt->cur != 0) {
|
||||||
|
/*
|
||||||
|
* aleksey: in some cases this line prints *second* error message
|
||||||
|
* (see bug #78858) and probably this should be fixed.
|
||||||
|
* However, we are not sure that all error messages are printed
|
||||||
|
* out in other places. It's not critical so we leave it as-is for now
|
||||||
|
*/
|
||||||
xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_EXPR_ERROR);
|
xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_EXPR_ERROR);
|
||||||
comp = NULL;
|
comp = NULL;
|
||||||
} else {
|
} else {
|
||||||
@ -10440,6 +10448,7 @@ xmlXPathCompiledEval(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctx) {
|
|||||||
void
|
void
|
||||||
xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt) {
|
xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt) {
|
||||||
xmlXPathCompileExpr(ctxt);
|
xmlXPathCompileExpr(ctxt);
|
||||||
|
CHECK_ERROR;
|
||||||
xmlXPathRunEval(ctxt);
|
xmlXPathRunEval(ctxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user