]> git.sesse.net Git - vlc/blobdiff - compat/inet_pton.c
Skins2: port Win32 code to UNICODE
[vlc] / compat / inet_pton.c
index f139138e66ea27227ce4033705c2b62f3b49bcfd..8e0c4c1a83dd46cf305919babdc0f3fbe5d4045b 100644 (file)
@@ -10,7 +10,7 @@
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public License
@@ -55,7 +55,7 @@ const char *inet_ntop (int af, const void *src, char *dst, int len)
     {
         case AF_INET:
             if (snprintf (dst, len, "%hhu.%hhu.%hhu.%hhu",
-                          b[0], b[1], b[2], b[3]) <= len)
+                          b[0], b[1], b[2], b[3]) >= len)
             {
                 errno = ENOSPC;
                 return NULL;