From 64d283702bbf0bde117fec5306d7f5cccfe75570 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 15 May 2015 13:01:33 +0100 Subject: [PATCH] Windows PuTTYgen: fix mis-setting of radio buttons. The menu options and radio buttons for key type were not consistently setting each other when selected: in particular, selecting from the menu did not cause the ED25519 radio button to be either set or unset when that would have been appropriate. Looks as if I failed to catch in code review the fact that we should have _one_ call to each of CheckRadioButton and CheckMenuRadioItem, and they should both have the right 'first' and 'last' parameters --- windows/winpgen.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/windows/winpgen.c b/windows/winpgen.c index e67a55af..1086c08c 100644 --- a/windows/winpgen.c +++ b/windows/winpgen.c @@ -968,15 +968,12 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg, state = (struct MainDlgState *) GetWindowLongPtr(hwnd, GWLP_USERDATA); if (!IsDlgButtonChecked(hwnd, LOWORD(wParam))) - CheckRadioButton(hwnd, IDC_KEYSSH1, IDC_KEYSSH2DSA, + CheckRadioButton(hwnd, + IDC_KEYSSH1, IDC_KEYSSH2ED25519, LOWORD(wParam)); - CheckMenuRadioItem(state->keymenu, IDC_KEYSSH1, IDC_KEYSSH2DSA, + CheckMenuRadioItem(state->keymenu, + IDC_KEYSSH1, IDC_KEYSSH2ED25519, LOWORD(wParam), MF_BYCOMMAND); - CheckRadioButton(hwnd, IDC_KEYSSH1, IDC_KEYSSH2ECDSA, - LOWORD(wParam)); - CheckMenuRadioItem(state->keymenu, IDC_KEYSSH1, - IDC_KEYSSH2ECDSA, - LOWORD(wParam), MF_BYCOMMAND); } break; case IDC_QUIT: