Commit a33d7fc8 authored by Colin Finck's avatar Colin Finck Committed by Alexandre Julliard

Fix some hackish usages of WideCharToMultiByte.

parent 1e7f8919
......@@ -1072,7 +1072,7 @@ static LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam, LPCHOOSEFO
LF_FACESIZE, lpcfa->lpLogFont->lfFaceName, LF_FACESIZE, 0, 0);
if((lpcfw->Flags & CF_USESTYLE) && lpcfw->lpszStyle) {
len = WideCharToMultiByte(CP_ACP, 0, lpcfw->lpszStyle, -1, NULL, -1, 0, 0);
len = WideCharToMultiByte(CP_ACP, 0, lpcfw->lpszStyle, -1, NULL, 0, 0, 0);
WideCharToMultiByte(CP_ACP, 0, lpcfw->lpszStyle, -1, lpcfa->lpszStyle, len, 0, 0);
HeapFree(GetProcessHeap(), 0, lpcfw->lpszStyle);
}
......
......@@ -2339,7 +2339,7 @@ static BOOL WINAPI CommitUrlCacheEntryInternal(
/* skip container path prefix */
lpszLocalFileName += lstrlenW(pContainer->path);
WideCharToMultiByte(CP_ACP, 0, lpszLocalFileName, -1, achFile, -1, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, lpszLocalFileName, -1, achFile, MAX_PATH, NULL, NULL);
pchLocalFileName = achFile;
for (cDirectory = 0; cDirectory < pHeader->DirectoryCount; cDirectory++)
......
......@@ -554,7 +554,7 @@ static void set_color_from_theme(WCHAR *keyName, COLORREF color)
keyNameSize = WideCharToMultiByte(CP_ACP, 0, keyName, -1, keyNameA, 0, NULL, NULL);
keyNameA = HeapAlloc(GetProcessHeap(), 0, keyNameSize);
WideCharToMultiByte(CP_ACP, 0, keyName, -1, keyNameA, -1, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, keyName, -1, keyNameA, keyNameSize, NULL, NULL);
for (i=0; i<sizeof(metrics)/sizeof(metrics[0]); i++)
{
......@@ -593,7 +593,7 @@ static void do_parse_theme(WCHAR *file)
keyNameValueSize = WideCharToMultiByte(CP_ACP, 0, keyNameValue, -1,
keyNameValueA, 0, NULL, NULL);
keyNameValueA = HeapAlloc(GetProcessHeap(), 0, keyNameValueSize);
WideCharToMultiByte(CP_ACP, 0, keyNameValue, -1, keyNameValueA, -1, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, keyNameValue, -1, keyNameValueA, keyNameValueSize, NULL, NULL);
WINE_TRACE("parsing key: %s with value: %s\n",
wine_dbgstr_w(keyNamePtr), wine_dbgstr_w(keyNameValue));
......
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