From 1b4b4a9bb5b6287019f09f09cf96c6b0dda666e3 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 24 Mar 2021 11:57:44 +0100 Subject: [PATCH] start: Avoid duplicate backslashes in command line. Signed-off-by: Alexandre Julliard --- 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 */