Added
Link Here
|
1 |
--- dlls/ntdll/unix/loader.c.orig 2023-07-19 15:29:22 UTC |
2 |
+++ dlls/ntdll/unix/loader.c |
3 |
@@ -694,6 +694,21 @@ static NTSTATUS loader_exec( char **argv, WORD machine |
4 |
{ |
5 |
if (machine != current_machine) |
6 |
{ |
7 |
+ char* wineserver_path = getenv("WINESERVER"); |
8 |
+ if (wineserver_path != NULL && wineserver_path[0] == '/') { |
9 |
+ char* s = remove_tail(wineserver_path, "server"); |
10 |
+ if (s != NULL) { |
11 |
+ if (machine == IMAGE_FILE_MACHINE_AMD64) { |
12 |
+ argv[1] = malloc(strlen(s) + 3); |
13 |
+ strcpy(argv[1], s); |
14 |
+ strcat(argv[1], "64"); |
15 |
+ } else { |
16 |
+ argv[1] = s; |
17 |
+ } |
18 |
+ preloader_exec(argv); |
19 |
+ } |
20 |
+ } |
21 |
+ |
22 |
if (machine == IMAGE_FILE_MACHINE_AMD64) /* try the 64-bit loader */ |
23 |
{ |
24 |
size_t len = strlen(wineloader); |