fixed a bug in the adjacent target optimisation
authorAndrew Tridgell <tridge@samba.org>
Tue, 5 Jan 1999 01:57:13 +0000 (01:57 +0000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 5 Jan 1999 01:57:13 +0000 (01:57 +0000)
match.c

diff --git a/match.c b/match.c
index 38e8aa018285c2c748ed8de666b1234e46b36884..c231c2ac738151778a6c9a6e7c4a742c05693151 100644 (file)
--- a/match.c
+++ b/match.c
@@ -199,7 +199,7 @@ static void hash_search(int f,struct sum_struct *s,
                        /* we've found a match, but now check to see
                            if last_i can hint at a better match */
                        for (j++; j<s->count && targets[j].t == t; j++) {
-                               int i2 = targets[j].t;
+                               int i2 = targets[j].i;
                                if (i2 == last_i + 1) {
                                        if (sum != s->sums[i2].sum1) break;
                                        if (memcmp(sum2,s->sums[i2].sum2,csum_length) != 0) break;