[ros-diffs] [cwittich] 28012: fix bug introduced in r27994

cwittich at svn.reactos.org cwittich at svn.reactos.org
Sun Jul 29 19:30:21 CEST 2007


Author: cwittich
Date: Sun Jul 29 21:30:21 2007
New Revision: 28012

URL: http://svn.reactos.org/svn/reactos?rev=28012&view=rev
Log:
fix bug introduced in r27994

Modified:
    trunk/reactos/base/applications/regedit/childwnd.c

Modified: trunk/reactos/base/applications/regedit/childwnd.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/childwnd.c?rev=28012&r1=28011&r2=28012&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/childwnd.c (original)
+++ trunk/reactos/base/applications/regedit/childwnd.c Sun Jul 29 21:30:21 2007
@@ -513,12 +513,15 @@
                   HKEY hKey = NULL;
                   LPNMTVDISPINFO ptvdi;
                   LONG lResult;
+                  TCHAR szBuffer[MAX_PATH];
 
                   ptvdi = (LPNMTVDISPINFO) lParam;
                   if (ptvdi->item.pszText)
                   {
+                    keyPath = GetItemPath(pChildWnd->hTreeWnd, TreeView_GetParent(pChildWnd->hTreeWnd, ptvdi->item.hItem), &hRootKey);
+                    _sntprintf(szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0]), _T("%s\\%s"), keyPath, ptvdi->item.pszText);
                     keyPath = GetItemPath(pChildWnd->hTreeWnd, ptvdi->item.hItem, &hRootKey);
-                    if (RegOpenKeyEx(hRootKey, keyPath, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+                    if (RegOpenKeyEx(hRootKey, szBuffer, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
                     {
                       lResult = REG_OPENED_EXISTING_KEY;
                       RegCloseKey(hKey);




More information about the Ros-diffs mailing list