mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-08 04:39:34 +00:00
No need to copy that argument.
The copy also lacked the NUL terminator, wouldn't surprise me if it crashed. Let's just clean it up.
This commit is contained in:
parent
43c8fc50be
commit
b4c6831b56
@ -2187,12 +2187,7 @@ static bool frontend_linux_set_fork(enum frontend_fork fork_mode)
|
|||||||
|
|
||||||
static void frontend_linux_exec(const char *path, bool should_load_game)
|
static void frontend_linux_exec(const char *path, bool should_load_game)
|
||||||
{
|
{
|
||||||
char *newargv[] = { NULL, NULL };
|
const char *newargv[] = { path, NULL };
|
||||||
size_t len = strlen(path);
|
|
||||||
|
|
||||||
newargv[0] = malloc(len);
|
|
||||||
|
|
||||||
strlcpy(newargv[0], path, len);
|
|
||||||
|
|
||||||
execv(path, newargv);
|
execv(path, newargv);
|
||||||
perror("execv");
|
perror("execv");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user