forked from mirror/go-json
Refactor nul character
This commit is contained in:
parent
53792a1f58
commit
2240ebcb1a
|
@ -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++
|
||||||
|
|
Loading…
Reference in New Issue