X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=results.c;h=19480fd22d0e3405d00768c4a199f740b80a1177;hb=609094fe14ca90cd5417ee22de621f76d1d0ec94;hp=1f1deda13bc3c66708a43d29494e9580419d9313;hpb=95310b9c1cf213f4ba28cab981400678d399717a;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<