Fix a string allocation.

This commit is contained in:
Maxime Bellengé 2004-05-02 04:20:23 +00:00 committed by Alexandre Julliard
parent 7e1d83ee70
commit 54d7cb60e1
1 changed files with 1 additions and 1 deletions

View File

@ -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;