mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +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.
|
||||
if ((short_index > 0) && ((short_index < long_index) || (long_index == -1)))
|
||||
{
|
||||
char *tmp = argv[optind];
|
||||
argv[optind] = argv[optind + short_index];
|
||||
argv[optind + short_index] = tmp;
|
||||
char *tmp[short_index];
|
||||
memcpy(tmp, &argv[optind], sizeof(tmp));
|
||||
memmove(&argv[optind], &argv[optind + short_index], (argc - short_index) * sizeof(char*));
|
||||
memcpy(&argv[argc - short_index], tmp, sizeof(tmp));
|
||||
short_index = 0;
|
||||
}
|
||||
else if ((long_index > 0) && ((long_index < short_index) || (short_index == -1)))
|
||||
{
|
||||
char *tmp = argv[optind];
|
||||
argv[optind] = argv[optind + long_index];
|
||||
argv[optind + long_index] = tmp;
|
||||
char *tmp[long_index];
|
||||
memcpy(tmp, &argv[optind], sizeof(tmp));
|
||||
memmove(&argv[optind], &argv[optind + long_index], (argc - long_index) * sizeof(char*));
|
||||
memcpy(&argv[argc - long_index], tmp, sizeof(tmp));
|
||||
long_index = 0;
|
||||
}
|
||||
|
||||
|
@ -281,7 +281,7 @@ static void parse_config_file(void)
|
||||
{
|
||||
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);
|
||||
if (!conf)
|
||||
|
Loading…
x
Reference in New Issue
Block a user