X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=results.c;h=19480fd22d0e3405d00768c4a199f740b80a1177;hb=609094fe14ca90cd5417ee22de621f76d1d0ec94;hp=7570e5ab3c38bbd3ee1f481a9f2d7f348f796524;hpb=cf6d366b25132eea7b0f1966c11d034d748af0fa;p=SXSI%2Fxpathcomp.git diff --git a/results.c b/results.c index 7570e5a..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<