Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
PrimaryBlock: Reset CRC before recalculation
Browse files Browse the repository at this point in the history
  • Loading branch information
oxzi committed Aug 8, 2019
1 parent 1b36eea commit ee62d62
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bundle/primary_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func (pb *PrimaryBlock) SetCRCType(crcType CRCType) {
// should not cause any errors. This method must be called both when creating
// the block and when changing its CRC.
func (pb *PrimaryBlock) calcualteCRC() error {
pb.CRC = nil
return pb.MarshalCbor(new(bytes.Buffer))
}

Expand Down

0 comments on commit ee62d62

Please sign in to comment.