commit | 8740bdc5afd07cf62722907644f65411cc52fa1c | [log] [tgz] |
---|---|---|
author | Robert Griesemer <gri@golang.org> | Thu Apr 30 13:24:05 2020 -0700 |
committer | Robert Griesemer <gri@golang.org> | Thu Apr 30 21:34:51 2020 +0000 |
tree | 05eeb98fc8c88ffa3764190cc1223de7eb10c617 | |
parent | 0f8fecaba762c352db481d4919edf404f5590d22 [diff] |
strconv: fix for parseFloatPrefix parseFloatPrefix accepts a string if it has a valid floating-point number as prefix. Make sure that "infi", "infin", ... etc. are accepted as valid numbers "inf" with suffix "i", "in", etc. This is important for parsing complex numbers such as "0+infi". This change does not affect the correctness of ParseFloat because ParseFloat rejects strings that contain a suffix after a valid floating-point number. Updates #36771. Change-Id: Ie1693a8ca2f8edf07b57688e0b35751b7100d39d Reviewed-on: https://go-review.googlesource.com/c/go/+/231237 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.