projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Wez Furlong's patch to add xterm mouse reporting and proper mouse
[u/mdw/putty]
/
puttygen.c
diff --git
a/puttygen.c
b/puttygen.c
index
ac5079e
..
6f5d816
100644
(file)
--- a/
puttygen.c
+++ b/
puttygen.c
@@
-93,7
+93,7
@@
struct PassphraseProcStruct {
*/
static int CALLBACK PassphraseProc(HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam) {
*/
static int CALLBACK PassphraseProc(HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam) {
- static char *passphrase;
+ static char *passphrase
= NULL
;
struct PassphraseProcStruct *p;
switch (msg) {
struct PassphraseProcStruct *p;
switch (msg) {
@@
-121,6
+121,7
@@
static int CALLBACK PassphraseProc(HWND hwnd, UINT msg,
if (p->comment)
SetDlgItemText(hwnd, 101, p->comment);
*passphrase = 0;
if (p->comment)
SetDlgItemText(hwnd, 101, p->comment);
*passphrase = 0;
+ SetDlgItemText(hwnd, 102, passphrase);
return 0;
case WM_COMMAND:
switch (LOWORD(wParam)) {
return 0;
case WM_COMMAND:
switch (LOWORD(wParam)) {
@@
-134,7
+135,7
@@
static int CALLBACK PassphraseProc(HWND hwnd, UINT msg,
EndDialog (hwnd, 0);
return 0;
case 102: /* edit box */
EndDialog (hwnd, 0);
return 0;
case 102: /* edit box */
- if (
HIWORD(wParam) == EN_CHANGE
) {
+ if (
(HIWORD(wParam) == EN_CHANGE) && passphrase
) {
GetDlgItemText (hwnd, 102, passphrase, PASSPHRASE_MAXLEN-1);
passphrase[PASSPHRASE_MAXLEN-1] = '\0';
}
GetDlgItemText (hwnd, 102, passphrase, PASSPHRASE_MAXLEN-1);
passphrase[PASSPHRASE_MAXLEN-1] = '\0';
}