Commit 69108af6 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Convert of couple more of string literals.

parent d1eb78a7
......@@ -741,17 +741,14 @@ BOOL search_dll_path(const struct process *process, const WCHAR *name, BOOL (*ma
if ((env = process_getenv(process, L"WINEBUILDDIR")))
{
const WCHAR dllsW[] = { '\\','d','l','l','s','\\' };
const WCHAR programsW[] = { '\\','p','r','o','g','r','a','m','s','\\' };
len = lstrlenW(env);
if (!(buf = heap_alloc((len + ARRAY_SIZE(programsW) + machine_dir_len +
if (!(buf = heap_alloc((len + wcslen(L"\\programs\\") + machine_dir_len +
2 * lstrlenW(name) + 1) * sizeof(WCHAR)))) return FALSE;
wcscpy(buf, env);
end = buf + len;
memcpy(end, dllsW, sizeof(dllsW));
lstrcpyW(end + ARRAY_SIZE(dllsW), name);
wcscpy(end, L"\\dlls\\");
wcscat(end, name);
if ((p = wcsrchr(end, '.')) && !lstrcmpW(p, L".so")) *p = 0;
if ((p = wcsrchr(end, '.')) && !lstrcmpW(p, L".dll")) *p = 0;
p = end + lstrlenW(end);
......@@ -764,9 +761,9 @@ BOOL search_dll_path(const struct process *process, const WCHAR *name, BOOL (*ma
lstrcpyW(p, name);
if (try_match_file(buf, match, param)) goto found;
memcpy(end, programsW, sizeof(programsW));
end += ARRAY_SIZE(programsW);
lstrcpyW(end, name);
wcscpy(end, L"\\programs\\");
end += wcslen(end);
wcscpy(end, name);
if ((p = wcsrchr(end, '.')) && !lstrcmpW(p, L".so")) *p = 0;
if ((p = wcsrchr(end, '.')) && !lstrcmpW(p, L".exe")) *p = 0;
p = end + lstrlenW(end);
......
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