From 290467bcd1f7c20af30e8072dd8fd3f3bc526b5e Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Wed, 20 Nov 2024 00:38:07 +0300 Subject: [PATCH] corrupter.c: fix type of `probability` --- src/corrupter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corrupter.c b/src/corrupter.c index d8ef186..abddec5 100644 --- a/src/corrupter.c +++ b/src/corrupter.c @@ -61,7 +61,7 @@ enum Interoperation_Result corrupt_byte(Interoperation_Input_Vars) { // generate bit mask byte damage_left = param->threshold; bool bit_mask[CHAR_BIT] = {false}; - uint8_t probability = param->probability; + uint16_t probability = param->probability; for (byte bit = 0; bit < CHAR_BIT; bit++) if (get_chance(probability) && damage_left > 0) {