]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winmisc.c
Make kh2reg.py compatible with modern Python.
[PuTTY.git] / windows / winmisc.c
index 3b57adf8f66ebbfc9c5fe5aa40153a5e3d75b689..5bf52141ca7aa1fab834e0d67a559d675cfd481d 100644 (file)
@@ -5,6 +5,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "putty.h"
+#define SECURITY_WIN32
 #include <security.h>
 
 OSVERSIONINFO osVersion;
@@ -219,8 +220,8 @@ const char *win_strerror(int error)
                            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                            msgtext, lenof(msgtext)-1, NULL)) {
             sprintf(msgtext,
-                    "(unable to format: FormatMessage returned %d)", 
-                    error, GetLastError());
+                    "(unable to format: FormatMessage returned %d)",
+                    GetLastError());
         } else {
             int len = strlen(msgtext);
             if (len > 0 && msgtext[len-1] == '\n')