From 2240ebcb1a96547f4556892124e2a4249f501148 Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Fri, 31 Jul 2020 18:07:23 +0900 Subject: [PATCH] Refactor nul character --- decode_string.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decode_string.go b/decode_string.go index 4eeb633..b521d11 100644 --- a/decode_string.go +++ b/decode_string.go @@ -115,7 +115,7 @@ func (d *stringDecoder) decodeByte(buf []byte, cursor int64) ([]byte, int64, err literal := buf[start:cursor] cursor++ return literal, cursor, nil - case '\000': + case nul: return nil, 0, errUnexpectedEndOfJSON("string", cursor) } cursor++