Skip to content
Browse files

why is this so complicated?

  • Loading branch information...
1 parent bced9e4 commit 51475f05516e9798548b3a52c240c3f42b6ca310 Robey Pointer committed Sep 2, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/gizzard/hash.rb
View
2 lib/gizzard/hash.rb
@@ -4,7 +4,7 @@ def self.fnv1a_64(data)
prime = 1099511628211
rv = 0xcbf29ce484222325
data.each_byte do |byte|
- rv = ((rv ^ (byte.ord & 0xff)) * prime) & 0xffffffffffffffff
+ rv = ((rv ^ (byte & 0xff)) * prime) & 0xffffffffffffffff
end
# trim to 60 bits for gizzard.
rv & 0x0fffffffffffffff

0 comments on commit 51475f0

Please sign in to comment.
Something went wrong with that request. Please try again.