diff options
Diffstat (limited to 'ext/repo_rpmmd.c')
-rw-r--r-- | ext/repo_rpmmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/repo_rpmmd.c b/ext/repo_rpmmd.c index 78264cc..729f4f7 100644 --- a/ext/repo_rpmmd.c +++ b/ext/repo_rpmmd.c @@ -651,13 +651,13 @@ put_in_cshash(struct parsedata *pd, const unsigned char *key, int keyl, Id id) while (ht[h]) { unsigned char *d = pd->csdata + ht[h]; - if (d[-1] == keyl && !memcmp(key, d, keyl)) + if (d[-1] == keyl - 1 && !memcmp(key, d, keyl)) return; /* XXX: first id wins... */ h = HASHCHAIN_NEXT(h, hh, hm); } } /* a new entry. put in csdata */ - pd->csdata = solv_extend(pd->csdata, pd->ncsdata, 1, 1 + keyl + sizeof(Id), 4095); + pd->csdata = solv_extend(pd->csdata, pd->ncsdata, 1 + keyl + sizeof(Id), 1, 4095); d = pd->csdata + pd->ncsdata; d[0] = keyl - 1; memcpy(d + 1, key, keyl); |