Make ByteNegMutator negate, not flip (#675)
Change the ByteNegMutator to negate a byte, not flip it. Flipping a byte is already implemented in ByteFlipMutator. See issue: https://github.com/AFLplusplus/LibAFL/issues/674
This commit is contained in:
parent
d9a0948377
commit
be3d1d588f
@ -271,7 +271,7 @@ where
|
|||||||
Ok(MutationResult::Skipped)
|
Ok(MutationResult::Skipped)
|
||||||
} else {
|
} else {
|
||||||
let byte = state.rand_mut().choose(input.bytes_mut());
|
let byte = state.rand_mut().choose(input.bytes_mut());
|
||||||
*byte = !*byte;
|
*byte = (-(*byte as i16)) as u8;
|
||||||
Ok(MutationResult::Mutated)
|
Ok(MutationResult::Mutated)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user