Skip to content

Commit

Permalink
Fix bug in int hashing in hashx
Browse files Browse the repository at this point in the history
  • Loading branch information
fluhus committed Nov 3, 2024
1 parent 74ea184 commit 78fe456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hashx/hashx.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func IntHashx[I constraints.Integer](h *Hashx, i I) uint64 {
h.h.Reset()
u := uint64(i)
for j := range 8 {
h.buf[j] = byte(u >> j)
h.buf[j] = byte(u >> (j * 8))
}
h.h.Write(h.buf)
return h.h.Sum64()
Expand Down

0 comments on commit 78fe456

Please sign in to comment.