forked from mirror/go-json
Refactor
This commit is contained in:
parent
a9b9597c2e
commit
18a8684873
|
@ -165,7 +165,7 @@ func (d *interfaceDecoder) decode(buf []byte, cursor int64, p uintptr) (int64, e
|
|||
cursor++
|
||||
*(*interface{})(unsafe.Pointer(p)) = *(*string)(unsafe.Pointer(&literal))
|
||||
return cursor, nil
|
||||
case '\000':
|
||||
case nul:
|
||||
return 0, errUnexpectedEndOfJSON("string", cursor)
|
||||
}
|
||||
cursor++
|
||||
|
|
|
@ -199,6 +199,7 @@ func TestIndentErrors(t *testing.T) {
|
|||
}
|
||||
|
||||
func diff(t *testing.T, a, b []byte) {
|
||||
t.Helper()
|
||||
for i := 0; ; i++ {
|
||||
if i >= len(a) || i >= len(b) || a[i] != b[i] {
|
||||
j := i - 10
|
||||
|
|
Loading…
Reference in New Issue