Skip to content

Commit

Permalink
fix: fix judgment on initial reversal condition
Browse files Browse the repository at this point in the history
  • Loading branch information
overcat committed Sep 14, 2022
1 parent 3dd1c26 commit 78db04f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ macro_rules! define_crc_fn {
None => CRC.digest(),
Some(mut value) => {
value ^= $crc_type.xorout;
if $crc_type.refin && $crc_type.refout {
if $crc_type.refout {
value = value.reverse_bits()
}
CRC.digest_with_initial(value)
Expand Down

0 comments on commit 78db04f

Please sign in to comment.