X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=results.c;h=19480fd22d0e3405d00768c4a199f740b80a1177;hb=9f227961ae2219728e4cdd56e4d4c4e7165e4306;hp=1f1deda13bc3c66708a43d29494e9580419d9313;hpb=cad5e2e2831477cba1f6211c57b9a4cc5b58bd55;p=SXSI%2Fxpathcomp.git diff --git a/results.c b/results.c index 1f1deda..19480fd 100644 --- a/results.c +++ b/results.c @@ -184,9 +184,9 @@ static int nextLarger (int *tree, int n, int p, int pos, int pot) { int answ; if (!getBit(tree,pos)) return -1; // no answer - pot--; pos = (pos<<1)+1; if (pos >= n) return 0; // when n is not a power of 2, missing leaves + pot--; if ((p>>pot) == 0) // p goes left { answ = nextLarger(tree,n,p&~(1<