From bd6e63122f047d519a57611a187a965c6a1c0b1c Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 1 Apr 2002 08:04:14 +0000 Subject: [PATCH] fixed a bug in the nodeset to boolean comparison code pointed out by * xpath.c: fixed a bug in the nodeset to boolean comparison code pointed out by Melvyn Sopacua. Daniel --- ChangeLog | 5 +++++ xpath.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 498b4e4a..4d47b49c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Apr 1 10:02:57 CEST 2002 Daniel Veillard + + * xpath.c: fixed a bug in the nodeset to boolean comparison code + pointed out by Melvyn Sopacua. + Fri Mar 29 23:41:53 CET 2002 Daniel Veillard * libxml.m4: Frédéric Crozat gave a patch related to the change diff --git a/xpath.c b/xpath.c index ac37f73f..68d44526 100644 --- a/xpath.c +++ b/xpath.c @@ -4423,9 +4423,11 @@ xmlXPathEqualValues(xmlXPathParserContextPtr ctxt) { case XPATH_NODESET: case XPATH_XSLT_TREE: if ((arg2->nodesetval == NULL) || - (arg2->nodesetval->nodeNr == 0)) ret = 0; + (arg2->nodesetval->nodeNr == 0)) + ret = 0; else ret = 1; + ret = (ret == arg1->boolval); break; case XPATH_BOOLEAN: #ifdef DEBUG_EXPR