Skip to content

Commit

Permalink
Merge pull request #607 from rembosk8/master
Browse files Browse the repository at this point in the history
Fix decode Infinity number. Exp value always must be 0.
  • Loading branch information
sijms authored Oct 7, 2024
2 parents 7d718a2 + ce5a5c4 commit 4526d69
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions v2/number.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ func (num *Number) decode() (strNum string, exp int, negative bool, err error) {

if _isPosInf(num.data) || _isNegInf(num.data) {
strNum = "Infinity"
exp = 0
return
}

Expand Down

0 comments on commit 4526d69

Please sign in to comment.