diff --git a/decode_float.go b/decode_float.go index 2cdabe2..3393a6c 100644 --- a/decode_float.go +++ b/decode_float.go @@ -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 } } diff --git a/decode_int.go b/decode_int.go index 676490d..3db1f45 100644 --- a/decode_int.go +++ b/decode_int.go @@ -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 } } diff --git a/decode_uint.go b/decode_uint.go index 0048e60..5ab2277 100644 --- a/decode_uint.go +++ b/decode_uint.go @@ -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 } }