Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions internal/helper/sdk/bech32.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,7 @@ func ConvertBits(data []byte, fromBits, toBits uint8, pad bool) ([]byte, error)

// The number of bytes to next extract is the minimum of
// remFromBits and remToBits.
toExtract := remFromBits
if remToBits < toExtract {
toExtract = remToBits
}
toExtract := min(remToBits, remFromBits)

// Add the next bits to nextByte, shifting the already
// added bits to the left.
Expand Down