[PATCH v10 0/1] MR11315: winevdm.c: Fix how Wine handles DOS-era PIF files.
This merge request has been split into three, the other two being [here](https://gitlab.winehq.org/wine/wine/-/merge_requests/11498) and [here](https://gitlab.winehq.org/wine/wine/-/merge_requests/11487). This one focuses on a patch for Wine's handling of PIF files as described in [issue 3638](https://bugs.winehq.org/show_bug.cgi?id=3638). -- v10: winevdm.c: Fix how Wine handles DOS-era PIF files. https://gitlab.winehq.org/wine/wine/-/merge_requests/11315
From: "Iain S. McCluney" <imccluney@comcast.net> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=3638 --- programs/winevdm/winevdm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/programs/winevdm/winevdm.c b/programs/winevdm/winevdm.c index f51e7cc9ca9..fda69367643 100644 --- a/programs/winevdm/winevdm.c +++ b/programs/winevdm/winevdm.c @@ -289,7 +289,7 @@ static VOID pif_cmd( char *filename, char *cmdline) MessageBoxA( NULL, buf, "16 bit DOS subsystem", MB_OK|MB_ICONWARNING); } /* search for the program */ - if( !SearchPathA( NULL, progname, NULL, MAX_PATH, progpath, NULL )) { + if( !SearchPathA( NULL, filename, NULL, MAX_PATH, progpath, NULL )) { sprintf( buf, "%s\nInvalid program file name. Check your pif file.", filename); MessageBoxA( NULL, buf, "16 bit DOS subsystem", MB_OK|MB_ICONERROR); @@ -302,6 +302,13 @@ static VOID pif_cmd( char *filename, char *cmdline) /* if no arguments on the commandline, use them from the pif file */ if( !cmdline[0] && optparams[0]) cmdline = optparams; + if( (p = strrchr( progpath, '\\'))) + *p = '\0'; + if( !(p = strrchr( progname, '\\'))) { + memmove( progname + 1, progname, strlen(progname) + 1); + progname[0] = '\\'; + } + strcat( progpath, p ? p : progname); /* FIXME: do something with: * - close on exit * - graphic modes -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11315
This merge request was approved by Iain S. McCluney. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11315
I followed all the directions and pushed to the master branch. Now it should be ready to merge. Same with requests [11487](https://gitlab.winehq.org/wine/wine/-/merge_requests/11487) and [11498](https://gitlab.winehq.org/wine/wine/-/merge_requests/11498). Sorry about all the mess, but at least it has helped me to understand the ideal practices on GitLab (and other software platforms). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11315#note_149641
participants (2)
-
Iain S. McCluney -
Iain S. McCluney (@BigBlueGnu)