Commit 6dc401e2 authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Remove a call to HEAP_strdupAtoW in the Color dialog.

parent 9e7c1111
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "wingdi.h" #include "wingdi.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "heap.h"
#include "commdlg.h" #include "commdlg.h"
#include "dlgs.h" #include "dlgs.h"
#include "debugtools.h" #include "debugtools.h"
...@@ -1508,10 +1507,13 @@ BOOL WINAPI ChooseColorA( LPCHOOSECOLORA lpChCol ) ...@@ -1508,10 +1507,13 @@ BOOL WINAPI ChooseColorA( LPCHOOSECOLORA lpChCol )
lpcc->lCustData = lpChCol->lCustData; lpcc->lCustData = lpChCol->lCustData;
lpcc->lpfnHook = (LPCCHOOKPROC) lpChCol->lpfnHook; lpcc->lpfnHook = (LPCCHOOKPROC) lpChCol->lpfnHook;
if ((lpcc->Flags & CC_ENABLETEMPLATE) && (lpChCol->lpTemplateName)) { if ((lpcc->Flags & CC_ENABLETEMPLATE) && (lpChCol->lpTemplateName)) {
if (HIWORD(lpChCol->lpTemplateName)) if (HIWORD(lpChCol->lpTemplateName)) {
lpcc->lpTemplateName = HEAP_strdupAtoW(GetProcessHeap(), 0, lpChCol->lpTemplateName); INT len = MultiByteToWideChar( CP_ACP, 0, lpChCol->lpTemplateName, -1, NULL, 0);
else lpcc->lpTemplateName = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpChCol->lpTemplateName, -1, lpcc->lpTemplateName, len );
} else {
lpcc->lpTemplateName = (LPWSTR)lpChCol->lpTemplateName; lpcc->lpTemplateName = (LPWSTR)lpChCol->lpTemplateName;
}
} }
ret = ChooseColorW(lpcc); ret = ChooseColorW(lpcc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment