Module: wine Branch: master Commit: 234b0d8c1e4770b956d5037f0f98d58bd32fb725 URL: http://source.winehq.org/git/wine.git/?a=commit;h=234b0d8c1e4770b956d5037f0f...
Author: Andrew Talbot Andrew.Talbot@talbotville.com Date: Sat Jul 7 17:20:48 2007 +0100
comdlg32: Cast-qual warning fix.
---
dlls/comdlg32/fontdlg16.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/comdlg32/fontdlg16.c b/dlls/comdlg32/fontdlg16.c index 3580af5..9a85729 100644 --- a/dlls/comdlg32/fontdlg16.c +++ b/dlls/comdlg32/fontdlg16.c @@ -76,10 +76,12 @@ static void CFn_CHOOSEFONT16to32W(const CHOOSEFONT16 *chf16, LPCHOOSEFONTW chf32 int len; if (chf16->Flags & CF_ENABLETEMPLATE) { + LPWSTR name32w; + len = MultiByteToWideChar( CP_ACP, 0, MapSL(chf16->lpTemplateName), -1, NULL, 0); - chf32w->lpTemplateName = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - MultiByteToWideChar( CP_ACP, 0, MapSL(chf16->lpTemplateName), - -1, (LPWSTR)chf32w->lpTemplateName, len); + name32w = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar( CP_ACP, 0, MapSL(chf16->lpTemplateName), -1, name32w, len); + chf32w->lpTemplateName = name32w; } if (chf16->Flags & CF_USESTYLE) {