mirror of
https://github.com/redis/go-redis.git
synced 2025-12-25 00:01:00 +03:00
fix: reader float parser (#2513)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user