Sha256: f850e6898a8447d30b4bcf04f510c8bde1fc0a1249a70f9090b5cc61fbd6b1ba

Contents?: true

Size: 933 Bytes

Versions: 17

Compression:

Stored size: 933 Bytes

Contents

From a005199330b86dada19d162cae15ef9bdcb6baa8 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Tue, 28 Jun 2016 14:19:58 +0200
Subject: [PATCH] Fix comparison with root node in xmlXPathCmpNodes

This change has already been made in xmlXPathCmpNodesExt but not in
xmlXPathCmpNodes.
---
 xpath.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xpath.c b/xpath.c
index 751665b..d992841 100644
--- a/xpath.c
+++ b/xpath.c
@@ -3342,13 +3342,13 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
      * compute depth to root
      */
     for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
-	if (cur == node1)
+	if (cur->parent == node1)
 	    return(1);
 	depth2++;
     }
     root = cur;
     for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
-	if (cur == node2)
+	if (cur->parent == node2)
 	    return(-1);
 	depth1++;
     }
-- 
2.9.3

Version data entries

17 entries across 15 versions & 3 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/nokogiri-1.7.1/patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
tdiary-5.0.5 vendor/bundle/gems/nokogiri-1.8.0/patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
tdiary-5.0.5 vendor/bundle/gems/nokogiri-1.7.1/patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.8.0 patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.8.0-x86-mingw32 patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.8.0-x64-mingw32 patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.8.0-java patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.7.2 patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.7.2-x86-mingw32 patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.7.2-x64-mingw32 patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.7.2-java patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/nokogiri-1.7.1/patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
tdiary-5.0.4 vendor/bundle/gems/nokogiri-1.7.1/patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.7.1 patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.7.1-x86-mingw32 patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.7.1-x64-mingw32 patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
nokogiri-1.7.1-java patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch