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