mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
parent
d6495550f5
commit
ba04643b61
1 changed files with 2 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ void parse_cli_opts(int argc, char* argv[])
|
||||||
gCLIOpts.FullScreen = 0;
|
gCLIOpts.FullScreen = 0;
|
||||||
gCLIOpts.ConfigFile = malloc(31);
|
gCLIOpts.ConfigFile = malloc(31);
|
||||||
strncpy(gCLIOpts.ConfigFile, "sm64config.txt", strlen("sm64config.txt"));
|
strncpy(gCLIOpts.ConfigFile, "sm64config.txt", strlen("sm64config.txt"));
|
||||||
|
gCLIOpts.ConfigFile[strlen("sm64config.txt") + 1] = '\0';
|
||||||
|
|
||||||
// Scan arguments for options
|
// Scan arguments for options
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
|
|
@ -48,6 +49,7 @@ void parse_cli_opts(int argc, char* argv[])
|
||||||
} else {
|
} else {
|
||||||
memset(gCLIOpts.ConfigFile, 0, 30);
|
memset(gCLIOpts.ConfigFile, 0, 30);
|
||||||
strncpy(gCLIOpts.ConfigFile, argv[i+1], strlen(argv[i+1]));
|
strncpy(gCLIOpts.ConfigFile, argv[i+1], strlen(argv[i+1]));
|
||||||
|
gCLIOpts.ConfigFile[strlen(argv[i+1]) + 1] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue