Fix reverse ordered config parameters
This commit is contained in:
10
rc.c
10
rc.c
@@ -1512,6 +1512,7 @@ panel_set_option(struct parsed_tagarg *arg)
|
|||||||
{
|
{
|
||||||
FILE *f = NULL;
|
FILE *f = NULL;
|
||||||
char *p;
|
char *p;
|
||||||
|
Str s = Strnew(), tmp;
|
||||||
|
|
||||||
if (config_file == NULL) {
|
if (config_file == NULL) {
|
||||||
disp_message("There's no config file... config not saved", FALSE);
|
disp_message("There's no config file... config not saved", FALSE);
|
||||||
@@ -1527,14 +1528,17 @@ panel_set_option(struct parsed_tagarg *arg)
|
|||||||
if (arg->value) {
|
if (arg->value) {
|
||||||
p = conv_to_system(arg->value);
|
p = conv_to_system(arg->value);
|
||||||
if (set_param(arg->arg, p)) {
|
if (set_param(arg->arg, p)) {
|
||||||
if (f)
|
tmp = Sprintf("%s %s\n", arg->arg, p);
|
||||||
fprintf(f, "%s %s\n", arg->arg, p);
|
Strcat(tmp, s);
|
||||||
|
s = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arg = arg->next;
|
arg = arg->next;
|
||||||
}
|
}
|
||||||
if (f)
|
if (f) {
|
||||||
|
fputs(s->ptr, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
}
|
||||||
sync_with_option();
|
sync_with_option();
|
||||||
backBf();
|
backBf();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user