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:
parent
ec14df8a7b
commit
31eb96a6f6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user