浏览代码

fix issue on 32bit platform

Tao Wen 8 年之前
父节点
当前提交
17cbb770f0
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      feature_iter_object.go

+ 2 - 2
feature_iter_object.go

@@ -28,7 +28,7 @@ func (iter *Iterator) ReadObject() (ret string) {
 }
 
 func (iter *Iterator) readFieldHash() int32 {
-	hash := 0x811c9dc5
+	hash := int64(0x811c9dc5)
 	c := iter.nextToken()
 	if c == '"' {
 		for {
@@ -57,7 +57,7 @@ func (iter *Iterator) readFieldHash() int32 {
 }
 
 func calcHash(str string) int32 {
-	hash := 0x811c9dc5
+	hash := int64(0x811c9dc5)
 	for _, b := range str {
 		hash ^= int(b)
 		hash *= 0x1000193