Fix occasional crash due to construction of bad pointer

You don't want to create a slice with a bad base pointer, even if the
len and cap are 0.

Fixes #1.
1 file changed
tree: 005d135adb3ea16d0468339cad82f3efa7821739
  1. xxhsum/
  2. LICENSE.txt
  3. README.md
  4. xxhash.go
  5. xxhash_amd64.go
  6. xxhash_amd64.s
  7. xxhash_amd64_test.go
  8. xxhash_other.go
  9. xxhash_test.go
README.md

xxhash

GoDoc

xxhash is a Go implementation of the 64-bit xxHash algorithm, XXH64. This is a high-quality hashing algorithm that is much faster than anything in the Go standard library.

On amd64 there is an even faster assembly implementation that runs at over 10 GB/s on my laptop.