aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/md5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mhmake/src/md5.cpp')
-rw-r--r--tools/mhmake/src/md5.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/mhmake/src/md5.cpp b/tools/mhmake/src/md5.cpp
index 2161b3c75..908f28134 100644
--- a/tools/mhmake/src/md5.cpp
+++ b/tools/mhmake/src/md5.cpp
@@ -210,7 +210,7 @@ static uint8 md5_padding[64] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
-void md5_update( md5_context *ctx, uint8 *input, uint32 length )
+void md5_update( md5_context *ctx, uint8 *input, size_t length )
{
uint32 left, fill;
@@ -224,8 +224,7 @@ void md5_update( md5_context *ctx, uint8 *input, uint32 length )
left = ctx->total[0] & 0x3F;
fill = 64 - left;
- ctx->total[0] += length;
- ctx->total[0] &= 0xFFFFFFFF;
+ ctx->total[0] = (uint32)((ctx->total[0] + length)& 0xFFFFFFFF);
if( ctx->total[0] < length )
ctx->total[1]++;