From: simon Date: Sat, 22 Mar 2003 09:22:52 +0000 (+0000) Subject: Fixed the bug whereby PuTTYgen went into generation mode as soon as X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/a06a0632374ecf14aca3e0025a0a985f24fdaac4 Fixed the bug whereby PuTTYgen went into generation mode as soon as it started up. The problem was that I was accepting _any_ event on IDC_GENERATE to trigger this, not just the `clicked' event, and some uninteresting event like `initialise' must have occurred. Quite why this only showed up as a result of the config box revamp I can't imagine. git-svn-id: svn://svn.tartarus.org/sgt/putty@2972 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/puttygen.c b/puttygen.c index dff3b4da..d85f4cce 100644 --- a/puttygen.c +++ b/puttygen.c @@ -1050,6 +1050,9 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg, } return 0; case IDC_GENERATE: + if (HIWORD(wParam) != BN_CLICKED && + HIWORD(wParam) != BN_DOUBLECLICKED) + break; state = (struct MainDlgState *) GetWindowLong(hwnd, GWL_USERDATA); if (!state->generation_thread_exists) {