]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
inet_pton.c: Fix MSVC run-time check failure (2)
authorMarcel Raad <MarcelRaad@users.noreply.github.com>
Thu, 3 Sep 2015 09:32:39 +0000 (11:32 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 3 Sep 2015 09:37:50 +0000 (11:37 +0200)
This fixes another run-time check failure because of a narrowing cast on
Visual C++.

Closes #408

lib/inet_pton.c

index 34dfc31e7e930a328412cf57c0066a9be1277f81..7d4714db7842987480a457e332b68d7058b98166 100644 (file)
@@ -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) {
     /*