1
0
mirror of https://git.disroot.org/80486DX2-66/polonium.git synced 2024-12-26 15:10:40 +05:30

corrupter.c: initialize array bit_mask to all false values

This commit is contained in:
Intel A80486DX2-66 2024-11-19 21:49:55 +03:00
parent d4ee7a5de2
commit 07c0d1af8a
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -59,15 +59,13 @@ enum Interoperation_Result corrupt_byte(Interoperation_Input_Vars) {
// generate bit mask
byte damage_left = param->threshold;
static bool bit_mask[CHAR_BIT];
bool bit_mask[CHAR_BIT] = {false};
uint8_t probability = param->probability;
for (byte bit = 0; bit < CHAR_BIT; bit++) {
if (get_chance(probability) && (damage_left > 0)) {
bit_mask[bit] = true;
damage_left--;
} else {
bit_mask[bit] = false;
}
}