]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Oops - fix silly segfault in new puttygen
authorSimon Tatham <anakin@pobox.com>
Sat, 3 Mar 2001 12:05:36 +0000 (12:05 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 3 Mar 2001 12:05:36 +0000 (12:05 +0000)
[originally from svn r974]

puttygen.c

index e93781c49f3d6c0992af4e9bff00c2fd8e3972bb..8ce44b4a13b8c208c55f61be0b102d79e06e10c0 100644 (file)
@@ -789,10 +789,13 @@ static int CALLBACK MainDlgProc (HWND hwnd, UINT msg,
         EnableWindow(GetDlgItem(hwnd, IDC_GENERATE), 1);
         EnableWindow(GetDlgItem(hwnd, IDC_LOAD), 1);
         EnableWindow(GetDlgItem(hwnd, IDC_SAVE), 1);
-       if (state->ssh2)
+       if (state->ssh2) {
+           state->ssh2key.data = &state->key;
+           state->ssh2key.alg = &ssh_rsa;
            state->commentptr = &state->ssh2key.comment;
-       else
+       } else {
            state->commentptr = &state->key.comment;
+       }
         /*
          * Invent a comment for the key. We'll do this by including
          * the date in it. This will be so horrifyingly ugly that