Decode: ensure signed exponents don't start with an underscore (#699)
This commit is contained in:
@@ -2317,6 +2317,14 @@ func TestUnmarshalDecodeErrors(t *testing.T) {
|
||||
desc: "number with negative sign and leading underscore",
|
||||
data: `a = -_0`,
|
||||
},
|
||||
{
|
||||
desc: "exponent with plus sign and leading underscore",
|
||||
data: `a = 0e+_0`,
|
||||
},
|
||||
{
|
||||
desc: "exponent with negative sign and leading underscore",
|
||||
data: `a = 0e-_0`,
|
||||
},
|
||||
{
|
||||
desc: "int with wrong base",
|
||||
data: `a = 0f2`,
|
||||
|
||||
Reference in New Issue
Block a user