Fixed handling of configurations with full stops in the name.
This commit is contained in:
parent
25a332f556
commit
c0048bc24f
2 changed files with 7 additions and 25 deletions
14
src/pc.c
14
src/pc.c
|
|
@ -249,22 +249,20 @@ void initpc(int argc, char *argv[])
|
|||
}
|
||||
else if (!strcasecmp(argv[c], "--config"))
|
||||
{
|
||||
int d;
|
||||
char *ext;
|
||||
|
||||
if ((c+1) == argc)
|
||||
break;
|
||||
strncpy(config_file_default, argv[c+1], 256);
|
||||
strcpy(config_name, get_filename(config_file_default));
|
||||
|
||||
for (d = 0; d < strlen(config_name); d++)
|
||||
ext = get_extension(config_name);
|
||||
if (ext && ext[0])
|
||||
{
|
||||
if (config_name[d] == '.')
|
||||
{
|
||||
config_name[d] = 0;
|
||||
break;
|
||||
}
|
||||
ext--;
|
||||
*ext = 0;
|
||||
}
|
||||
|
||||
|
||||
config_override = 1;
|
||||
c++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue