mirror of
https://github.com/json-iterator/go.git
synced 2024-11-24 08:22:14 +02:00
fix issue on 32bit platform
This commit is contained in:
parent
17cbb770f0
commit
9670a03165
@ -43,7 +43,7 @@ func (iter *Iterator) readFieldHash() int32 {
|
||||
}
|
||||
return int32(hash)
|
||||
}
|
||||
hash ^= int(b)
|
||||
hash ^= int64(b)
|
||||
hash *= 0x1000193
|
||||
}
|
||||
if !iter.loadMore() {
|
||||
@ -59,7 +59,7 @@ func (iter *Iterator) readFieldHash() int32 {
|
||||
func calcHash(str string) int32 {
|
||||
hash := int64(0x811c9dc5)
|
||||
for _, b := range str {
|
||||
hash ^= int(b)
|
||||
hash ^= int64(b)
|
||||
hash *= 0x1000193
|
||||
}
|
||||
return int32(hash)
|
||||
|
Loading…
Reference in New Issue
Block a user