* fix

* wrapping
This commit is contained in:
Dongjia Zhang 2022-07-04 20:11:28 +02:00 committed by GitHub
parent be3d1d588f
commit 7870a6e699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -271,7 +271,7 @@ where
Ok(MutationResult::Skipped)
} else {
let byte = state.rand_mut().choose(input.bytes_mut());
*byte = (-(*byte as i16)) as u8;
*byte = (!(*byte)).wrapping_add(1);
Ok(MutationResult::Mutated)
}
}