From 6681db131f0cf5810d67f4a92ad8d85fef4a12ca Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Tue, 25 Aug 2020 17:19:19 +0900 Subject: [PATCH] Fix StructFieldHead operation --- encode_vm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encode_vm.go b/encode_vm.go index b9f4eaf..a9ebb3b 100644 --- a/encode_vm.go +++ b/encode_vm.go @@ -550,7 +550,7 @@ func (e *Encoder) run(code *opcode) error { e.encodeBytes(field.key) } code = field.next - code.ptr = ptr + code.ptr = ptr + field.offset field.nextField.ptr = ptr } case opStructFieldAnonymousHead: