From fccd80a7d35b9eefabcc384d5c9fe89d9545dd22 Mon Sep 17 00:00:00 2001 From: Aron Xu Date: Tue, 22 Sep 2015 16:23:21 +0800 Subject: Upstream post release cherry-picks --- debian/patches/0008-Fix-order-of-root-nodes.patch | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 debian/patches/0008-Fix-order-of-root-nodes.patch (limited to 'debian/patches/0008-Fix-order-of-root-nodes.patch') diff --git a/debian/patches/0008-Fix-order-of-root-nodes.patch b/debian/patches/0008-Fix-order-of-root-nodes.patch new file mode 100644 index 0000000..171c3da --- /dev/null +++ b/debian/patches/0008-Fix-order-of-root-nodes.patch @@ -0,0 +1,29 @@ +From: Nick Wellnhofer +Date: Sun, 8 Mar 2015 16:44:11 +0100 +Subject: Fix order of root nodes + +Make sure root nodes are sorted before other nodes. +--- + xpath.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xpath.c b/xpath.c +index dc41ce6..95559b3 100644 +--- a/xpath.c ++++ b/xpath.c +@@ -361,13 +361,13 @@ turtle_comparison: + /* + * compute depth to root + */ +- for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) { ++ for (depth2 = 0, cur = node2; cur != NULL; cur = cur->parent) { + if (cur == node1) + return(1); + depth2++; + } + root = cur; +- for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) { ++ for (depth1 = 0, cur = node1; cur != NULL; cur = cur->parent) { + if (cur == node2) + return(-1); + depth1++; -- cgit v1.2.3