Skip to content

Commit

Permalink
fix : vm.go.tmpl
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed May 29, 2023
1 parent 89c61b5 commit 3a5cec6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cmd/generator/vm.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]b
code = code.End.Next
}
} else {
mapCtx.Slice.Items[mapCtx.Idx].Value = b[mapCtx.Start:len(b)]
mapCtx.Slice.Items[mapCtx.Idx].Value = b[mapCtx.Start:]
if idx < mapCtx.Len {
mapCtx.Idx = int(idx)
mapCtx.Start = len(b)
Expand All @@ -453,7 +453,7 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]b
if (ctx.Option.Flag & encoder.UnorderedMapOption) != 0 {
b = appendColon(ctx, b)
} else {
mapCtx.Slice.Items[mapCtx.Idx].Key = b[mapCtx.Start:len(b)]
mapCtx.Slice.Items[mapCtx.Idx].Key = b[mapCtx.Start:]
mapCtx.Start = len(b)
}
value := mapitervalue(&mapCtx.Iter)
Expand Down

0 comments on commit 3a5cec6

Please sign in to comment.