mirror of https://github.com/go-redis/redis.git
fix: reader float parser (#2513)
This commit is contained in:
parent
37c057b8e5
commit
46f245075e
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue