diff --git a/encode_vm_escaped.go b/encode_vm_escaped.go index 1188b57..b0efc65 100644 --- a/encode_vm_escaped.go +++ b/encode_vm_escaped.go @@ -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{