Open
Description
What version of protobuf and what language are you using?
Version: master, Go
What did you do?
With the parseNumber function:
func main() {
n, ok := parseNumber([]byte("1234,anything can come after the comma"))
if ok {
panic(fmt.Sprintf("should not be ok, %d", n))
}
}
panics with should not be ok, 4
, indicating that it parsed "1234,anything can come after the comma"
into the integer 1234
, even though this should really throw an error.
What did you expect to see?
ok == false
What did you see instead?
ok == true
Anything else we should know about your project / environment?
No
Metadata
Metadata
Assignees
Labels
No labels