[PATCH 1/1] regedit: Allow renaming of values in root keys

Hugh McMaster wine at gitlab.winehq.org
Thu Jun 30 06:10:38 CDT 2022


From: Hugh McMaster <hugh.mcmaster at outlook.com>

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 programs/regedit/framewnd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c
index 83e4ec89ee0..c9eb2c4c469 100644
--- a/programs/regedit/framewnd.c
+++ b/programs/regedit/framewnd.c
@@ -946,9 +946,10 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
     case ID_EDIT_RENAME:
     {
         WCHAR* keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
-        if (keyPath == 0 || *keyPath == 0) {
+        if (!keyPath) {
             MessageBeep(MB_ICONHAND);
-        } else if (GetFocus() == g_pChildWnd->hTreeWnd) {
+            break;
+        } else if (*keyPath && GetFocus() == g_pChildWnd->hTreeWnd) {
             StartKeyRename(g_pChildWnd->hTreeWnd);
         } else if (GetFocus() == g_pChildWnd->hListWnd) {
             StartValueRename(g_pChildWnd->hListWnd);
-- 
GitLab

https://gitlab.winehq.org/wine/wine/-/merge_requests/348



More information about the wine-devel mailing list