diff --git a/src/corrupter.c b/src/corrupter.c index 0a463d6..737c06c 100644 --- a/src/corrupter.c +++ b/src/corrupter.c @@ -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; } }