Huw Davies : comdlg32: Make the unicode copy the same size as the ansi version.
Alexandre Julliard
julliard at winehq.org
Fri Sep 21 14:22:40 CDT 2012
Module: wine
Branch: master
Commit: 914353d3dcf2f554e5cc5294d81499efa81a13d0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=914353d3dcf2f554e5cc5294d81499efa81a13d0
Author: Huw Davies <huw at codeweavers.com>
Date: Fri Sep 21 13:22:46 2012 +0100
comdlg32: Make the unicode copy the same size as the ansi version.
---
dlls/comdlg32/filedlg31.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comdlg32/filedlg31.c b/dlls/comdlg32/filedlg31.c
index f0763c5..dcef99e 100644
--- a/dlls/comdlg32/filedlg31.c
+++ b/dlls/comdlg32/filedlg31.c
@@ -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);
}
More information about the wine-cvs
mailing list