Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go/mysql/json/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ func (w *sqlWriter) writeNumber(top bool) error {
// Use the parser's readFloat to validate number grammar, rejecting
// malformed inputs like "1+2", "1..2", or "1e+" that a simple
// character-class loop would accept.
n, ok := readFloat(w.data[w.pos:])
n, _, _, ok := readFloat(w.data[w.pos:])
if !ok || n == 0 {
return fmt.Errorf("invalid number at position %d in JSON", w.pos)
}
Expand Down
Loading
Loading