ソースを参照

fix issue on 32bit platform

Tao Wen 8 年 前
コミット
9670a03165
1 ファイル変更2 行追加2 行削除
  1. 2 2
      feature_iter_object.go

+ 2 - 2
feature_iter_object.go

@@ -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)