mirror of https://github.com/goccy/go-json.git
Fix checkptr error
This commit is contained in:
parent
23c5766bd2
commit
24cc1b77b2
|
@ -242,7 +242,7 @@ func encodeRunEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, o
|
|||
ptr := load(ctxptr, code.idx)
|
||||
isPtr := code.typ.Kind() == reflect.Ptr
|
||||
p := ptrToUnsafePtr(ptr)
|
||||
if p == nil || isPtr && *(*unsafe.Pointer)(p) == nil {
|
||||
if p == nil || isPtr && **(**unsafe.Pointer)(unsafe.Pointer(&p)) == nil {
|
||||
b = append(b, '"', '"', ',')
|
||||
} else {
|
||||
v := *(*interface{})(unsafe.Pointer(&interfaceHeader{
|
||||
|
|
Loading…
Reference in New Issue