Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e6b9536

Browse files
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /