mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
regedit: Do not write junk after the LastKey value.
This commit is contained in:
parent
2b345484bc
commit
69b3782a82
@ -264,7 +264,7 @@ static void set_last_key(HWND hwndTV)
|
||||
if (RegCreateKeyExW(HKEY_CURRENT_USER, wszKeyName, 0, NULL, 0, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS)
|
||||
{
|
||||
wszVal = GetItemFullPath(g_pChildWnd->hTreeWnd, TreeView_GetSelection(g_pChildWnd->hTreeWnd), FALSE);
|
||||
RegSetValueExW(hkey, wszLastKey, 0, REG_SZ, (LPBYTE)wszVal, KEY_MAX_LEN * sizeof(WCHAR));
|
||||
RegSetValueExW(hkey, wszLastKey, 0, REG_SZ, (LPBYTE)wszVal, (lstrlenW(wszVal) + 1) * sizeof(WCHAR));
|
||||
HeapFree(GetProcessHeap(), 0, wszVal);
|
||||
RegCloseKey(hkey);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user