Skip to content

Commit e6b9536

Browse files
authored
Merge pull request #513 from AllenX2018/fix-issue-510
fix issue 510
2 parents 9b79a3e + a3465d7 commit e6b9536

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

iter_float.go

+3
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ non_decimal_loop:
288288
return iter.readFloat64SlowPath()
289289
}
290290
value = (value << 3) + (value << 1) + uint64(ind)
291+
if value > maxFloat64 {
292+
return iter.readFloat64SlowPath()
293+
}
291294
}
292295
}
293296
return iter.readFloat64SlowPath()

iter_int.go

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ var intDigits []int8
99

1010
const uint32SafeToMultiply10 = uint32(0xffffffff)/10 - 1
1111
const uint64SafeToMultiple10 = uint64(0xffffffffffffffff)/10 - 1
12+
const maxFloat64 = 1<<53 - 1
1213

1314
func init() {
1415
intDigits = make([]int8, 256)

0 commit comments

Comments
 (0)