shed bitfield: use Count to check for overflows
This commit is contained in:
parent
4579e9bb84
commit
6014530145
@ -172,6 +172,10 @@ var bitFieldStatCmd = &cli.Command{
|
||||
}
|
||||
}
|
||||
|
||||
if _, err := rle.Count(); err != nil { // check overflows
|
||||
fmt.Println("Error: ", err)
|
||||
}
|
||||
|
||||
fmt.Printf("Decoded length: %d bits\n", ones+zeros)
|
||||
fmt.Printf("\tOnes: %d\n", ones)
|
||||
fmt.Printf("\tZeros: %d\n", zeros)
|
||||
|
Loading…
Reference in New Issue
Block a user