Remove the variable 'bufused', which came over from winnet.c in
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 22 Jul 2013 19:55:53 +0000 (19:55 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 22 Jul 2013 19:55:53 +0000 (19:55 +0000)
mistaken cut and paste and is just a bug.

git-svn-id: svn://svn.tartarus.org/sgt/putty@9967 cda61777-01e9-0310-a592-d414129be87e

windows/winmisc.c

index 525d52c..c719c72 100644 (file)
@@ -210,7 +210,7 @@ const char *win_strerror(int error)
     es = find234(errstrings, &error, errstring_find);
 
     if (!es) {
-        int bufsize, bufused;
+        int bufsize;
 
         es = snew(struct errstring);
         es->error = error;
@@ -220,7 +220,7 @@ const char *win_strerror(int error)
         if (!FormatMessage((FORMAT_MESSAGE_FROM_SYSTEM |
                             FORMAT_MESSAGE_IGNORE_INSERTS), NULL, error,
                            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-                           es->text + bufused, bufsize - bufused, NULL)) {
+                           es->text, bufsize, NULL)) {
             sprintf(es->text,
                     "Windows error code %d (and FormatMessage returned %d)", 
                     error, GetLastError());