mirror of https://github.com/goccy/go-json.git
Fix stream decoder bug
This commit is contained in:
parent
80acd42b80
commit
53792a1f58
|
@ -37,6 +37,7 @@ func floatBytes(s *stream) []byte {
|
|||
continue
|
||||
} else if s.char() == nul {
|
||||
if s.read() {
|
||||
s.cursor-- // for retry current character
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ func (d *intDecoder) decodeStreamByte(s *stream) ([]byte, error) {
|
|||
continue
|
||||
} else if s.char() == nul {
|
||||
if s.read() {
|
||||
s.cursor-- // for retry current character
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
@ -82,6 +83,7 @@ func (d *intDecoder) decodeStreamByte(s *stream) ([]byte, error) {
|
|||
continue
|
||||
} else if s.char() == nul {
|
||||
if s.read() {
|
||||
s.cursor-- // for retry current character
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ func (d *uintDecoder) decodeStreamByte(s *stream) ([]byte, error) {
|
|||
continue
|
||||
} else if s.char() == nul {
|
||||
if s.read() {
|
||||
s.cursor-- // for retry current character
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue