Fix index number about length for recursive type

This commit is contained in:
Masaaki Goshima 2021-06-12 22:02:03 +09:00
parent 79ccab759f
commit 56e5d7a457
1 changed files with 2 additions and 2 deletions

View File

@ -269,8 +269,8 @@ func linkRecursiveCode(c *Opcode) {
lastCode.Length = lastCode.Idx + 2*uintptrSize
// extend length to alloc slot for elemIdx + length
totalLength := uintptr(code.TotalLength() + 2)
nextTotalLength := uintptr(c.TotalLength() + 2)
totalLength := uintptr(code.TotalLength() + 3)
nextTotalLength := uintptr(c.TotalLength() + 3)
c.End.Next.Op = OpRecursiveEnd