]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winnet.c
Use correct type to print Windows error codes.
[PuTTY.git] / windows / winnet.c
index 680de2a756338b4fe8ccc429033f69fb100e49d8..c7f68ef942b27908eb6d08482e5a3b7a6f9f5242 100644 (file)
@@ -478,8 +478,8 @@ const char *winsock_error_string(int error)
                            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                            es->text + bufused, bufsize - bufused, NULL)) {
             sprintf(es->text + bufused,
-                    "Windows error code %d (and FormatMessage returned %d)", 
-                    error, GetLastError());
+                    "Windows error code %d (and FormatMessage returned %u)",
+                    error, (unsigned int)GetLastError());
         } else {
             int len = strlen(es->text);
             if (len > 0 && es->text[len-1] == '\n')