From 0594faf227c653e2b45b77350bf5c836a9430de7 Mon Sep 17 00:00:00 2001 From: kichik Date: Tue, 6 Feb 2007 20:58:44 +0000 Subject: [PATCH] czi's patch for bug #1651312 git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4923 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/InstallOptions/InstallerOptions.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Contrib/InstallOptions/InstallerOptions.cpp b/Contrib/InstallOptions/InstallerOptions.cpp index cb050740..bede9e00 100644 --- a/Contrib/InstallOptions/InstallerOptions.cpp +++ b/Contrib/InstallOptions/InstallerOptions.cpp @@ -591,11 +591,10 @@ LRESULT WINAPI WMCommandProc(HWND hWnd, UINT id, HWND hwndCtl, UINT codeNotify) if (g_done || nIdx < 0) return 0; - FieldType *pField = pFields + nIdx; - - switch (pField->nType) + switch (pFields[nIdx].nType) { case FIELD_BROWSEBUTTON: + --nIdx; case FIELD_LINK: case FIELD_BUTTON: case FIELD_CHECKBOX: @@ -612,11 +611,7 @@ LRESULT WINAPI WMCommandProc(HWND hWnd, UINT id, HWND hwndCtl, UINT codeNotify) return 0; } - if (pFields[nIdx].nType == FIELD_BROWSEBUTTON) - { - --nIdx; - --pField; - } + FieldType *pField = pFields + nIdx; char szBrowsePath[MAX_PATH];