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:
@@ -571,7 +571,7 @@ process_t* process_start_shell(char *const envp[], int *in, int *out, int *err,
|
|||||||
GetLastError());
|
GetLastError());
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (path[len + 1] != '\\')
|
if (path[len - 1] != '\\')
|
||||||
{
|
{
|
||||||
strncat(path, "\\", sizeof(path) - len++);
|
strncat(path, "\\", sizeof(path) - len++);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user