Skip to content

Commit

Permalink
fix: reader float parser (#2513)
Browse files Browse the repository at this point in the history
  • Loading branch information
iliyanm authored Apr 4, 2023
1 parent 37c057b commit 46f2450
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/proto/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ func (r *Reader) readFloat(line []byte) (float64, error) {
return math.Inf(1), nil
case "-inf":
return math.Inf(-1), nil
case "nan", "-nan":
return math.NaN(), nil
}
return strconv.ParseFloat(v, 64)
}
Expand Down

0 comments on commit 46f2450

Please sign in to comment.