Decode: use cleaned byte slice throughout parseFloat (#735)

Fixes #734
This commit is contained in:
Cameron Moore
2022-01-06 13:34:27 -06:00
committed by GitHub
parent e83cf535f5
commit 146f70ea8a
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -279,6 +279,11 @@ func TestUnmarshal_Floats(t *testing.T) {
input: `1.0_e2`,
err: true,
},
{
desc: "leading zero in positive float",
input: `+0_0.0`,
err: true,
},
}
type doc struct {