Skip to content

Commit

Permalink
fix(z): runtime error: index out of range for !amd64 env #287 (#307)
Browse files Browse the repository at this point in the history
This PR cherry picks [PR
287](#287) into main.

Co-authored-by: brain.duan <brain.duan@ebistrategy.com>
  • Loading branch information
joshua-goldstein and brain.duan committed Oct 10, 2022
1 parent dddaaf3 commit 9b20e9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion z/simd/search.go
Expand Up @@ -20,7 +20,7 @@ package simd

// Search uses the Clever search to find the correct key.
func Search(xs []uint64, k uint64) int16 {
if len(xs) < 8 {
if len(xs) < 8 || (len(xs) % 8 != 0) {
return Naive(xs, k)
}
var twos, pk [4]uint64
Expand Down

0 comments on commit 9b20e9a

Please sign in to comment.