Skip to content

Commit 02f1666

Browse files
committed
whitelist: Fix occasional overflow in unit test
1 parent c8ff901 commit 02f1666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zkp/whitelist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ mod tests {
404404
// incorrectly serialized with byte changed
405405
let mut encoded = correct_signature.serialize();
406406
let len = encoded.len();
407-
encoded[len - 1] = (encoded[len - 1] + 1) % 255;
407+
encoded[len - 1] = encoded[len - 1] ^ 0x01;
408408
let decoded = WhitelistSignature::from_slice(&encoded).unwrap();
409409
assert_eq!(
410410
Err(Error::InvalidWhitelistProof),

0 commit comments

Comments
 (0)