From 234b0d8c1e4770b956d5037f0f98d58bd32fb725 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Sat, 7 Jul 2007 17:20:48 +0100 Subject: [PATCH] comdlg32: Cast-qual warning fix. --- dlls/comdlg32/fontdlg16.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/comdlg32/fontdlg16.c b/dlls/comdlg32/fontdlg16.c index 3580af5d740..9a857296441 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) {