Skip to content

Commit

Permalink
fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
shamaton committed Mar 17, 2024
1 parent 3ba67fd commit 4acdbf1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/stream/decoding/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,20 @@ func (d *decoder) jumpOffset() error {

case code == def.Fixext1:
_, err = d.readSizeN(def.Byte1 + def.Byte1)
return err
case code == def.Fixext2:
_, err = d.readSizeN(def.Byte1 + def.Byte2)
return err
case code == def.Fixext4:
_, err = d.readSizeN(def.Byte1 + def.Byte4)
return err

Check warning on line 271 in internal/stream/decoding/struct.go

View check run for this annotation

Codecov / codecov/patch

internal/stream/decoding/struct.go#L263-L271

Added lines #L263 - L271 were not covered by tests
case code == def.Fixext8:
_, err = d.readSizeN(def.Byte1 + def.Byte8)
return err
case code == def.Fixext16:
_, err = d.readSizeN(def.Byte1 + def.Byte16)

return err

Check warning on line 277 in internal/stream/decoding/struct.go

View check run for this annotation

Codecov / codecov/patch

internal/stream/decoding/struct.go#L275-L277

Added lines #L275 - L277 were not covered by tests

case code == def.Ext8:
b, err := d.readSize1()
if err != nil {
Expand Down

0 comments on commit 4acdbf1

Please sign in to comment.