comdlg32: Make the unicode copy the same size as the ansi version.

This commit is contained in:
Huw Davies 2012-09-21 13:22:46 +01:00 committed by Alexandre Julliard
parent bdbc45fddd
commit 914353d3dc
1 changed files with 2 additions and 2 deletions

View File

@ -758,7 +758,6 @@ static void FD31_MapOfnStructA(const OPENFILENAMEA *ofnA, LPOPENFILENAMEW ofnW,
{
UNICODE_STRING usBuffer;
ofnW->lStructSize = sizeof(OPENFILENAMEW);
ofnW->hwndOwner = ofnA->hwndOwner;
ofnW->hInstance = ofnA->hInstance;
if (ofnA->lpstrFilter)
@ -935,7 +934,8 @@ static PFD31_DATA FD31_AllocPrivate(LPARAM lParam, UINT dlgType, BOOL IsUnicode)
if (lfs->ofnA->Flags & OFN_ENABLEHOOK)
if (lfs->ofnA->lpfnHook)
lfs->hook = TRUE;
lfs->ofnW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*lfs->ofnW));
lfs->ofnW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, lfs->ofnA->lStructSize);
lfs->ofnW->lStructSize = lfs->ofnA->lStructSize;
FD31_MapOfnStructA(lfs->ofnA, lfs->ofnW, lfs->open);
}