Skip to content

Commit

Permalink
Merge pull request #513 from AllenX2018/fix-issue-510
Browse files Browse the repository at this point in the history
fix issue 510
  • Loading branch information
AllenX2018 authored Nov 18, 2020
2 parents 9b79a3e + a3465d7 commit e6b9536
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions iter_float.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ non_decimal_loop:
return iter.readFloat64SlowPath()
}
value = (value << 3) + (value << 1) + uint64(ind)
if value > maxFloat64 {
return iter.readFloat64SlowPath()
}
}
}
return iter.readFloat64SlowPath()
Expand Down
1 change: 1 addition & 0 deletions iter_int.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var intDigits []int8

const uint32SafeToMultiply10 = uint32(0xffffffff)/10 - 1
const uint64SafeToMultiple10 = uint64(0xffffffffffffffff)/10 - 1
const maxFloat64 = 1<<53 - 1

func init() {
intDigits = make([]int8, 256)
Expand Down

0 comments on commit e6b9536

Please sign in to comment.