go/src/strconv
Rémy Oudompheng 41e1d9075e strconv: avoid panic on invalid call to FormatFloat
Calling FormatFloat with an invalid value of fmt is expected
to return a string containing '%' and the input fmt character.
Since even before Go 1.0, the code has been panicking in the
case where prec=0.

Fixes #52187

Change-Id: I74fec601eedb7fe28efc5132c4253674661452aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/402817
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Emmanuel Odeke <emmanuel@orijtech.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2022-06-24 23:50:20 +00:00
..
testdata
atob.go
atob_test.go
atoc.go
atoc_test.go
atof.go strconv: fix typo in atof.go 2022-06-06 18:50:50 +00:00
atof_test.go strconv: ParseFloat: always return ErrSyntax for bad syntax 2021-06-07 21:12:46 +00:00
atoi.go strconv: clarify ParseFloat accepts Go syntax for float literals 2022-06-04 21:18:25 +00:00
atoi_test.go strconv: document parsing of leading +/- 2021-06-09 18:16:27 +00:00
bytealg.go strconv: add QuotedPrefix 2021-05-04 00:56:00 +00:00
bytealg_bootstrap.go strconv: add QuotedPrefix 2021-05-04 00:56:00 +00:00
ctoa.go
ctoa_test.go
decimal.go
decimal_test.go
doc.go all: gofmt main repo 2022-04-11 16:34:30 +00:00
eisel_lemire.go all: gofmt main repo 2022-04-11 16:34:30 +00:00
example_test.go
export_test.go
fp_test.go all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
ftoa.go strconv: avoid panic on invalid call to FormatFloat 2022-06-24 23:50:20 +00:00
ftoa_test.go strconv: avoid panic on invalid call to FormatFloat 2022-06-24 23:50:20 +00:00
ftoaryu.go all: gofmt main repo 2022-04-11 16:34:30 +00:00
ftoaryu_test.go
internal_test.go
isprint.go
itoa.go all: remove trailing blank doc comment lines 2022-04-01 18:18:07 +00:00
itoa_test.go
makeisprint.go
quote.go all: gofmt main repo 2022-04-11 16:34:30 +00:00
quote_test.go strconv: quote rune 007F as \x7f, not \u007f 2022-03-31 20:37:15 +00:00
strconv_test.go