From: Marcel Raad Date: Thu, 3 Sep 2015 09:32:39 +0000 (+0200) Subject: inet_pton.c: Fix MSVC run-time check failure (2) X-Git-Tag: curl-7_45_0~78 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=668231c3093ea506e9ba2aa98f0a3130ac259a5b;p=thirdparty%2Fcurl.git inet_pton.c: Fix MSVC run-time check failure (2) This fixes another run-time check failure because of a narrowing cast on Visual C++. Closes #408 --- diff --git a/lib/inet_pton.c b/lib/inet_pton.c index 34dfc31e7e..7d4714db78 100644 --- a/lib/inet_pton.c +++ b/lib/inet_pton.c @@ -206,7 +206,7 @@ inet_pton6(const char *src, unsigned char *dst) if(tp + INT16SZ > endp) return (0); *tp++ = (unsigned char) (val >> 8) & 0xff; - *tp++ = (unsigned char) val & 0xff; + *tp++ = (unsigned char) (val & 0xff); } if(colonp != NULL) { /*