From: Loup Vaillant Date: Fri, 31 Jul 2020 21:04:16 +0000 (+0200) Subject: Fixed compiler warning X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=e2c4454f869b42cfa108c758b6c2dbe23490b74f;p=Monocypher.git Fixed compiler warning Fixes #187 Note: w should remain a signed integer, so w-1 is correctly compared in the FOR_T loop. --- diff --git a/src/monocypher.c b/src/monocypher.c index dd488e0..f5f93fc 100644 --- a/src/monocypher.c +++ b/src/monocypher.c @@ -1843,7 +1843,7 @@ static int slide_step(slide_ctx *ctx, int width, int i, const u8 scalar[32]) | (((lsb & 0xF0) != 0) << 2)); ctx->next_index = (i16)(i-(w-1)+s); ctx->next_digit = (i8) (v >> s ); - ctx->next_check -= w; + ctx->next_check -= (u8) w; } } return i == ctx->next_index ? ctx->next_digit: 0;