1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-29 11:24:36 +03:00

Fix off-by-one error

This commit is contained in:
Rui Ueyama 2021-03-08 22:42:59 +09:00
parent ec14df8a7b
commit 31eb96a6f6

View File

@ -742,7 +742,7 @@ void GnuHashSection::copy_buf() {
// Write hash bucket indices
u32 *buckets = (u32 *)(bloom + num_bloom);
for (i64 i = 1; i < hashes.size(); i++) {
for (i64 i = 0; i < hashes.size(); i++) {
i64 idx = hashes[i] % num_buckets;
if (!buckets[idx])
buckets[idx] = i + symoffset;