https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1aeac0bf24e716460d10702c846859600a9754e6
commit 1aeac0bf24e716460d10702c846859600a9754e6 Author: Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com> AuthorDate: Fri Dec 29 20:56:01 2023 +0900 Commit: GitHub <nore...@github.com> CommitDate: Fri Dec 29 20:56:01 2023 +0900 [REGEDIT] Fix condition of enabling load/unload hive menu item (#6251) Based on KRosUser's regedit_loadfix.patch. JIRA issue: CORE-19298 Fix the condition of enabling/disabling the "Load Hive" and Unload Hive menu items. --- base/applications/regedit/childwnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/applications/regedit/childwnd.c b/base/applications/regedit/childwnd.c index d77ed1899b3..eaacc07655f 100644 --- a/base/applications/regedit/childwnd.c +++ b/base/applications/regedit/childwnd.c @@ -272,8 +272,8 @@ UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath, BOOL bSelectNone) EnableMenuItem(hMenuFrame, ID_REGISTRY_LOADHIVE, MF_BYCOMMAND | MF_GRAYED); EnableMenuItem(hMenuFrame, ID_REGISTRY_UNLOADHIVE, MF_BYCOMMAND | MF_GRAYED); /* compare the strings to see if we should enable/disable the "Load Hive" menus accordingly */ - if (_wcsicmp(rootName, L"HKEY_LOCAL_MACHINE") != 0 || - _wcsicmp(rootName, L"HKEY_USERS") != 0) + if (_wcsicmp(rootName, L"HKEY_LOCAL_MACHINE") == 0 || + _wcsicmp(rootName, L"HKEY_USERS") == 0) { /* * enable the unload menu item if at the root, otherwise