diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c index 26f20409c..2e3a65c01 100644 --- a/lib/curl_ntlm_msgs.c +++ b/lib/curl_ntlm_msgs.c @@ -166,7 +166,8 @@ static unsigned int readint_le(unsigned char *buf) */ static unsigned short readshort_le(unsigned char *buf) { - return ((unsigned short)buf[0]) | ((unsigned short)buf[1] << 8); + return ((unsigned short)((unsigned short)buf[0]) | + (unsigned short)((unsigned short)buf[1] << 8)); } /*