diff --git a/src/test/fuzz/bip324.cpp b/src/test/fuzz/bip324.cpp index afe3cafafe..7954ea4ad1 100644 --- a/src/test/fuzz/bip324.cpp +++ b/src/test/fuzz/bip324.cpp @@ -94,7 +94,7 @@ FUZZ_TARGET_INIT(bip324_cipher_roundtrip, initialize_bip324) unsigned damage_bit = provider.ConsumeIntegralInRange(0, (ciphertext.size() + aad.size()) * 8U - 1U); unsigned damage_pos = damage_bit >> 3; - std::byte damage_val{(uint8_t)(1U << (damage_bit & 3))}; + std::byte damage_val{(uint8_t)(1U << (damage_bit & 7))}; if (damage_pos >= ciphertext.size()) { aad[damage_pos - ciphertext.size()] ^= damage_val; } else {