mirror of https://github.com/goccy/go-json.git
Fix index number about length for recursive type
This commit is contained in:
parent
79ccab759f
commit
56e5d7a457
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue