From df885b54ac1557d538a62b2846647d3068b46dcb Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Tue, 4 Dec 2018 09:23:12 -0500 Subject: Fix some misc MSVC warnings --- src/lib/modes/mode_pad/mode_pad.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/modes/mode_pad') diff --git a/src/lib/modes/mode_pad/mode_pad.cpp b/src/lib/modes/mode_pad/mode_pad.cpp index be3ecf7dc..19a2f15f8 100644 --- a/src/lib/modes/mode_pad/mode_pad.cpp +++ b/src/lib/modes/mode_pad/mode_pad.cpp @@ -202,16 +202,16 @@ size_t ESP_Padding::unpad(const uint8_t input[], size_t input_length) const const size_t last_byte = input[input_length-1]; auto bad_input = CT::Mask::is_zero(last_byte) | - CT::Mask::is_gt(last_byte, input_length); + CT::Mask::is_gt(last_byte, static_cast(input_length)); const size_t pad_pos = input_length - last_byte; size_t i = input_length - 1; while(i) { - const auto in_range = CT::Mask::is_gt(i, pad_pos); + const auto in_range = CT::Mask::is_gt(i, pad_pos); const auto incrementing = CT::Mask::is_equal(input[i-1], input[i]-1); - bad_input |= in_range & ~incrementing; + bad_input |= CT::Mask(in_range) & ~incrementing; --i; } -- cgit v1.2.3