aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-04 09:23:12 -0500
committerJack Lloyd <[email protected]>2018-12-04 09:23:12 -0500
commitdf885b54ac1557d538a62b2846647d3068b46dcb (patch)
treeb247074543e26c48604891c556d8226ec01415d8 /src/lib/modes
parent22159fd4b31323492fd2e49ca0bf19f2260e0fc5 (diff)
Fix some misc MSVC warnings
Diffstat (limited to 'src/lib/modes')
-rw-r--r--src/lib/modes/mode_pad/mode_pad.cpp6
1 files changed, 3 insertions, 3 deletions
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<uint8_t>::is_zero(last_byte) |
- CT::Mask<uint8_t>::is_gt(last_byte, input_length);
+ CT::Mask<uint8_t>::is_gt(last_byte, static_cast<uint8_t>(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<uint8_t>::is_gt(i, pad_pos);
+ const auto in_range = CT::Mask<size_t>::is_gt(i, pad_pos);
const auto incrementing = CT::Mask<uint8_t>::is_equal(input[i-1], input[i]-1);
- bad_input |= in_range & ~incrementing;
+ bad_input |= CT::Mask<uint8_t>(in_range) & ~incrementing;
--i;
}