Refactor nul character

This commit is contained in:
Masaaki Goshima 2020-07-31 18:07:23 +09:00
parent 53792a1f58
commit 2240ebcb1a
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ func (d *stringDecoder) decodeByte(buf []byte, cursor int64) ([]byte, int64, err
literal := buf[start:cursor] literal := buf[start:cursor]
cursor++ cursor++
return literal, cursor, nil return literal, cursor, nil
case '\000': case nul:
return nil, 0, errUnexpectedEndOfJSON("string", cursor) return nil, 0, errUnexpectedEndOfJSON("string", cursor)
} }
cursor++ cursor++