Use next code index for recursive call

This commit is contained in:
Masaaki Goshima 2020-09-15 20:48:16 +09:00
parent acee1ef8ba
commit e9e9aa8874
1 changed files with 1 additions and 1 deletions

View File

@ -654,7 +654,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, code *opcode) error {
} }
ctxptr = ctx.ptr() + ptrOffset // assign new ctxptr ctxptr = ctx.ptr() + ptrOffset // assign new ctxptr
store(ctxptr, 0, ptr) store(ctxptr, c.idx, ptr)
store(ctxptr, lastCode.idx, oldOffset) store(ctxptr, lastCode.idx, oldOffset)
store(ctxptr, lastCode.elemIdx, uintptr(unsafe.Pointer(code.next))) store(ctxptr, lastCode.elemIdx, uintptr(unsafe.Pointer(code.next)))