Skip to content
Snippets Groups Projects
Commit 54d7cb60 authored by Maxime Bellengé's avatar Maxime Bellengé Committed by Alexandre Julliard
Browse files

Fix a string allocation.

parent 7e1d83ee
Branches
Tags
No related merge requests found
......@@ -277,7 +277,7 @@ static HRESULT WINAPI IAutoComplete_fnInit(
LONG len;
/* pwszRegKeyPath contains the key as well as the value, so we split */
key = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, lstrlenW(pwzsRegKeyPath)*sizeof(WCHAR));
key = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwzsRegKeyPath)+1)*sizeof(WCHAR));
strcpyW(key, pwzsRegKeyPath);
value = strrchrW(key, '\\');
*value = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment