]> sjero.net Git - wget/blobdiff - src/snprintf.c
[svn] Update the license to include the OpenSSL exception.
[wget] / src / snprintf.c
index ea8d5002d374e19fc81857c3bfe7a37655f05fb9..4d1c3dd5788adf8fa2bbbe10add7b9fcdb3b977d 100644 (file)
@@ -321,7 +321,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
       case 'o':
        flags |= DP_F_UNSIGNED;
        if (cflags == DP_C_SHORT)
-         value = (short int)va_arg (args, int);
+         value = (unsigned short int)va_arg (args, unsigned int);
        else if (cflags == DP_C_LONG)
          value = va_arg (args, unsigned long int);
        else if (cflags == DP_C_LLONG)
@@ -333,7 +333,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
       case 'u':
        flags |= DP_F_UNSIGNED;
        if (cflags == DP_C_SHORT)
-         value = (unsigned short int)va_arg (args, int);
+         value = (unsigned short int)va_arg (args, unsigned int);
        else if (cflags == DP_C_LONG)
          value = va_arg (args, unsigned long int);
        else if (cflags == DP_C_LLONG)
@@ -347,7 +347,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
       case 'x':
        flags |= DP_F_UNSIGNED;
        if (cflags == DP_C_SHORT)
-         value = (short int)va_arg (args, int);
+         value = (unsigned short int)va_arg (args, unsigned int);
        else if (cflags == DP_C_LONG)
          value = va_arg (args, unsigned long int);
        else if (cflags == DP_C_LLONG)