Skip to content

Commit

Permalink
Fixed UB flagged by Miri.
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshikiTakashima authored and hsivonen committed Aug 24, 2020
1 parent 8e3eee5 commit 08a1a7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ macro_rules! basic_latin_alu {
let src_until_alignment = (ALU_ALIGNMENT
- ((src as usize) & ALU_ALIGNMENT_MASK))
& ALU_ALIGNMENT_MASK;
if (dst.add(src_until_alignment) as usize) & ALU_ALIGNMENT_MASK != 0 {
if (dst.wrapping_add(src_until_alignment) as usize) & ALU_ALIGNMENT_MASK != 0 {
break;
}
src_until_alignment
Expand Down

0 comments on commit 08a1a7e

Please sign in to comment.