summaryrefslogtreecommitdiff
path: root/modes.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-08-20 15:05:42 -0400
committerJeffrey Walton <noloader@gmail.com>2018-08-20 15:05:42 -0400
commit8db82708e30dd637d9d75f23c7c8f06decf5c809 (patch)
tree4fc7009eefb1a5c1f0cf4b0d48ad2f96e03c60d9 /modes.cpp
parentcb6f93c2ba9b0f8e0f28368281173d3a0d89464b (diff)
downloadcryptopp-git-8db82708e30dd637d9d75f23c7c8f06decf5c809.tar.gz
Clear conversion wanrings under MSVC
Diffstat (limited to 'modes.cpp')
-rw-r--r--modes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modes.cpp b/modes.cpp
index 3a1e1feb..bc728403 100644
--- a/modes.cpp
+++ b/modes.cpp
@@ -125,7 +125,7 @@ void CTR_ModePolicy::SeekToIteration(lword iterationCount)
int carry=0;
for (int i=BlockSize()-1; i>=0; i--)
{
- unsigned int sum = (unsigned int)m_register[i] + (iterationCount & 0xff) + carry;
+ unsigned int sum = m_register[i] + (byte)iterationCount + carry;
m_counterArray[i] = byte(sum & 0xff);
carry = sum >> 8;
iterationCount >>= 8;