GetDlgItemTextW takes buffer length in WCHARs not bytes.

This commit is contained in:
Dmitry Timoshkov 2005-03-16 19:48:04 +00:00 committed by Alexandre Julliard
parent fa241ee719
commit 38972345b8
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ static INT_PTR CALLBACK DlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM l
if(len > 0)
{
sFilter = (WCHAR*)GlobalAlloc(GPTR, (len + 1)*sizeof(WCHAR));
GetDlgItemTextW(hwnd, IDC_FILTER, sFilter, (len + 1)*sizeof(WCHAR));
GetDlgItemTextW(hwnd, IDC_FILTER, sFilter, len + 1);
}
else sFilter = NULL;
UpdateList(hList);