mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
Merge branch 'master' of github.com:Themaister/SSNES into ssnes-consoles
This commit is contained in:
commit
c18dce4783
14
getopt.c
14
getopt.c
@ -148,16 +148,18 @@ int getopt_long(int argc, char *argv[],
|
|||||||
// Non-POSIXy, but that's what getopt does by default.
|
// Non-POSIXy, but that's what getopt does by default.
|
||||||
if ((short_index > 0) && ((short_index < long_index) || (long_index == -1)))
|
if ((short_index > 0) && ((short_index < long_index) || (long_index == -1)))
|
||||||
{
|
{
|
||||||
char *tmp = argv[optind];
|
char *tmp[short_index];
|
||||||
argv[optind] = argv[optind + short_index];
|
memcpy(tmp, &argv[optind], sizeof(tmp));
|
||||||
argv[optind + short_index] = tmp;
|
memmove(&argv[optind], &argv[optind + short_index], (argc - short_index) * sizeof(char*));
|
||||||
|
memcpy(&argv[argc - short_index], tmp, sizeof(tmp));
|
||||||
short_index = 0;
|
short_index = 0;
|
||||||
}
|
}
|
||||||
else if ((long_index > 0) && ((long_index < short_index) || (short_index == -1)))
|
else if ((long_index > 0) && ((long_index < short_index) || (short_index == -1)))
|
||||||
{
|
{
|
||||||
char *tmp = argv[optind];
|
char *tmp[long_index];
|
||||||
argv[optind] = argv[optind + long_index];
|
memcpy(tmp, &argv[optind], sizeof(tmp));
|
||||||
argv[optind + long_index] = tmp;
|
memmove(&argv[optind], &argv[optind + long_index], (argc - long_index) * sizeof(char*));
|
||||||
|
memcpy(&argv[argc - long_index], tmp, sizeof(tmp));
|
||||||
long_index = 0;
|
long_index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ static void parse_config_file(void)
|
|||||||
{
|
{
|
||||||
config_file_t *conf = NULL;
|
config_file_t *conf = NULL;
|
||||||
|
|
||||||
if (strlen(g_extern.config_path) > 0)
|
if (*g_extern.config_path)
|
||||||
{
|
{
|
||||||
conf = config_file_new(g_extern.config_path);
|
conf = config_file_new(g_extern.config_path);
|
||||||
if (!conf)
|
if (!conf)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user