Fix stream decoder bug

This commit is contained in:
Masaaki Goshima 2020-07-31 18:07:11 +09:00
parent 80acd42b80
commit 53792a1f58
3 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,7 @@ func floatBytes(s *stream) []byte {
continue continue
} else if s.char() == nul { } else if s.char() == nul {
if s.read() { if s.read() {
s.cursor-- // for retry current character
continue continue
} }
} }

View File

@ -63,6 +63,7 @@ func (d *intDecoder) decodeStreamByte(s *stream) ([]byte, error) {
continue continue
} else if s.char() == nul { } else if s.char() == nul {
if s.read() { if s.read() {
s.cursor-- // for retry current character
continue continue
} }
} }
@ -82,6 +83,7 @@ func (d *intDecoder) decodeStreamByte(s *stream) ([]byte, error) {
continue continue
} else if s.char() == nul { } else if s.char() == nul {
if s.read() { if s.read() {
s.cursor-- // for retry current character
continue continue
} }
} }

View File

@ -38,6 +38,7 @@ func (d *uintDecoder) decodeStreamByte(s *stream) ([]byte, error) {
continue continue
} else if s.char() == nul { } else if s.char() == nul {
if s.read() { if s.read() {
s.cursor-- // for retry current character
continue continue
} }
} }