mirror of https://github.com/goccy/go-json.git
Fix indent num contains recursive type
This commit is contained in:
parent
a2ba5e8bcc
commit
79ccab759f
|
@ -484,7 +484,7 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]b
|
|||
oldOffset := ptrOffset
|
||||
ptrOffset += code.Jmp.CurLen * uintptrSize
|
||||
oldBaseIndent := ctx.BaseIndent
|
||||
ctx.BaseIndent += code.Indent - 1
|
||||
ctx.BaseIndent += code.Indent
|
||||
|
||||
newLen := offsetNum + code.Jmp.CurLen + code.Jmp.NextLen
|
||||
if curlen < newLen {
|
||||
|
|
|
@ -484,7 +484,7 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]b
|
|||
oldOffset := ptrOffset
|
||||
ptrOffset += code.Jmp.CurLen * uintptrSize
|
||||
oldBaseIndent := ctx.BaseIndent
|
||||
ctx.BaseIndent += code.Indent - 1
|
||||
ctx.BaseIndent += code.Indent
|
||||
|
||||
newLen := offsetNum + code.Jmp.CurLen + code.Jmp.NextLen
|
||||
if curlen < newLen {
|
||||
|
|
|
@ -484,7 +484,7 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]b
|
|||
oldOffset := ptrOffset
|
||||
ptrOffset += code.Jmp.CurLen * uintptrSize
|
||||
oldBaseIndent := ctx.BaseIndent
|
||||
ctx.BaseIndent += code.Indent - 1
|
||||
ctx.BaseIndent += code.Indent
|
||||
|
||||
newLen := offsetNum + code.Jmp.CurLen + code.Jmp.NextLen
|
||||
if curlen < newLen {
|
||||
|
|
|
@ -484,7 +484,7 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]b
|
|||
oldOffset := ptrOffset
|
||||
ptrOffset += code.Jmp.CurLen * uintptrSize
|
||||
oldBaseIndent := ctx.BaseIndent
|
||||
ctx.BaseIndent += code.Indent - 1
|
||||
ctx.BaseIndent += code.Indent
|
||||
|
||||
newLen := offsetNum + code.Jmp.CurLen + code.Jmp.NextLen
|
||||
if curlen < newLen {
|
||||
|
|
|
@ -484,7 +484,7 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]b
|
|||
oldOffset := ptrOffset
|
||||
ptrOffset += code.Jmp.CurLen * uintptrSize
|
||||
oldBaseIndent := ctx.BaseIndent
|
||||
ctx.BaseIndent += code.Indent - 1
|
||||
ctx.BaseIndent += code.Indent
|
||||
|
||||
newLen := offsetNum + code.Jmp.CurLen + code.Jmp.NextLen
|
||||
if curlen < newLen {
|
||||
|
|
Loading…
Reference in New Issue