Skip to content

Commit

Permalink
jpeg/bitstream: Use wrapping additions explicitly
Browse files Browse the repository at this point in the history
Signed-off-by: caleb <etemesicaleb@gmail.com>
  • Loading branch information
etemesi254 committed Jan 29, 2023
1 parent 3e59af7 commit f749f95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zune-jpeg/src/bitstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,11 @@ impl BitStream
{
if *coefficient >= 0
{
*coefficient += bit;
*coefficient = coefficient.wrapping_add(bit);
}
else
{
*coefficient -= bit;
*coefficient = coefficient.wrapping_sub(bit);
}
}
}
Expand Down

0 comments on commit f749f95

Please sign in to comment.