Alexandre Julliard : start: Avoid duplicate backslashes in command line.

Alexandre Julliard julliard at winehq.org
Mon Jun 7 15:02:07 CDT 2021


Module: wine
Branch: stable
Commit: ea2a235727c3c3dbf018d2168d215c86c5e8b99d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ea2a235727c3c3dbf018d2168d215c86c5e8b99d

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Mar 24 11:57:44 2021 +0100

start: Avoid duplicate backslashes in command line.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 1b4b4a9bb5b6287019f09f09cf96c6b0dda666e3)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 programs/start/start.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/programs/start/start.c b/programs/start/start.c
index e3071a3a09a..4b31e07dfee 100644
--- a/programs/start/start.c
+++ b/programs/start/start.c
@@ -280,7 +280,7 @@ static BOOL search_path(const WCHAR *firstParam, WCHAR **full_path)
         GetFullPathNameW(temp, MAX_PATH, thisDir, NULL);
 
         /* 1. If extension supplied, see if that file exists */
-        lstrcatW(thisDir, L"\\");
+        if (thisDir[lstrlenW(thisDir) - 1] != '\\') lstrcatW(thisDir, L"\\");
         lstrcatW(thisDir, stemofsearch);
         pos = &thisDir[lstrlenW(thisDir)]; /* Pos = end of name */
 




More information about the wine-cvs mailing list