Skip to content

Commit

Permalink
fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-mescudi committed Dec 9, 2024
1 parent e5411a8 commit c4c09f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@ func GetlenOfData(data []byte) (int, error) {
container += binary
}

n, err := strconv.ParseInt(container, 2, 32)
n, err := strconv.ParseUint(container, 2, 32)
if err != nil {
return 0, fmt.Errorf("error parsing binary to int: %e", err)
}

return int(n), nil
}

func FlipBit(num uint32, position uint8) uint32 {
return num ^ (1 << position)
}
Expand Down

0 comments on commit c4c09f8

Please sign in to comment.