process: Correctly read last path character on Windows

Fixes: 7dd06d274d ("process: Add a wrapper to invoke a command under the system default shell")
This commit is contained in:
Tobias Brunner
2026-07-23 10:26:08 +02:00
parent 6dfebcede5
commit 097c7a1e0a
+1 -1
View File
@@ -571,7 +571,7 @@ process_t* process_start_shell(char *const envp[], int *in, int *out, int *err,
GetLastError());
return NULL;
}
if (path[len + 1] != '\\')
if (path[len - 1] != '\\')
{
strncat(path, "\\", sizeof(path) - len++);
}