From 4c15d27bf4add07e9b471033299ebd3a31dbc6df Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Mon, 3 Nov 2014 14:39:34 -0500 Subject: [PATCH] fixes an issue with signed/unsigned comparison --- websocketpp/sha1/sha1.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websocketpp/sha1/sha1.hpp b/websocketpp/sha1/sha1.hpp index df15a5f485..43a843382d 100755 --- a/websocketpp/sha1/sha1.hpp +++ b/websocketpp/sha1/sha1.hpp @@ -163,7 +163,7 @@ inline void calc(void const * src, size_t bytelength, unsigned char * hash) { // Handle the last and not full 64 byte block if existing. endCurrentBlock = bytelength - currentBlock; clearWBuffert(w); - int lastBlockBytes = 0; + size_t lastBlockBytes = 0; for (;lastBlockBytes < endCurrentBlock; ++lastBlockBytes) { w[lastBlockBytes >> 2] |= (unsigned int) sarray[lastBlockBytes + currentBlock] << ((3 - (lastBlockBytes & 3)) << 3); }