Skip to content

Commit

Permalink
skippy peanut butter
Browse files Browse the repository at this point in the history
  • Loading branch information
awalterschulze committed Jan 10, 2021
1 parent 550e889 commit b03c65e
Show file tree
Hide file tree
Showing 74 changed files with 597 additions and 1,600 deletions.
16 changes: 3 additions & 13 deletions plugin/unmarshal/unmarshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip
p.P(`return err`)
p.Out()
p.P(`}`)
p.P(`if skippy < 0 {`)
p.P(`if (skippy < 0) || (iNdEx + skippy) < 0 {`)
p.In()
p.P(`return ErrInvalidLength`, p.localName)
p.Out()
Expand Down Expand Up @@ -1484,12 +1484,7 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) {
p.P(`return err`)
p.Out()
p.P(`}`)
p.P(`if skippy < 0 {`)
p.In()
p.P(`return ErrInvalidLength`, p.localName)
p.Out()
p.P(`}`)
p.P(`if (iNdEx + skippy) < 0 {`)
p.P(`if (skippy < 0) || (iNdEx + skippy) < 0 {`)
p.In()
p.P(`return ErrInvalidLength`, p.localName)
p.Out()
Expand All @@ -1512,12 +1507,7 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) {
p.P(`return err`)
p.Out()
p.P(`}`)
p.P(`if skippy < 0 {`)
p.In()
p.P(`return ErrInvalidLength`, p.localName)
p.Out()
p.P(`}`)
p.P(`if (iNdEx + skippy) < 0 {`)
p.P(`if (skippy < 0) || (iNdEx + skippy) < 0 {`)
p.In()
p.P(`return ErrInvalidLength`, p.localName)
p.Out()
Expand Down
10 changes: 2 additions & 8 deletions test/asymetric-issue125/asym.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 6 additions & 12 deletions test/casttype/combos/both/casttype.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 6 additions & 12 deletions test/casttype/combos/unmarshaler/casttype.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions test/castvalue/combos/both/castvalue.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions test/castvalue/combos/unmarshaler/castvalue.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b03c65e

Please sign in to comment.