mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-26 06:20:16 -04:00
force M_SaveDefaults() to always write the help string (#168)
* force M_SaveDefaults() to always write the help string * fix gcc build * add comment
This commit is contained in:
parent
fd60d9fdfe
commit
ce2c0cc30f
@ -1983,7 +1983,7 @@ void M_SaveDefaults (void)
|
||||
{
|
||||
char tmpfile[PATH_MAX+1];
|
||||
register default_t *dp;
|
||||
int line, blanks;
|
||||
int blanks;
|
||||
FILE *f;
|
||||
|
||||
// killough 10/98: for when exiting early
|
||||
@ -2009,11 +2009,14 @@ void M_SaveDefaults (void)
|
||||
|
||||
// killough 10/98: output comment lines which were read in during input
|
||||
|
||||
for (blanks = 1, line = 0, dp = defaults; ; dp++, blanks = 0)
|
||||
for (blanks = 1, dp = defaults; ; dp++, blanks = 0)
|
||||
{
|
||||
int brackets = 0;
|
||||
config_t value;
|
||||
|
||||
// Always write a help string to avoid
|
||||
// incorrect entries in the user config
|
||||
/*
|
||||
for (;line < comment && comments[line].line <= dp-defaults; line++)
|
||||
if (*comments[line].text != '[' || (brackets = 1, config_help))
|
||||
|
||||
@ -2026,6 +2029,7 @@ void M_SaveDefaults (void)
|
||||
putc('\n',f) == EOF)) ||
|
||||
fputs(comments[line].text, f) == EOF)
|
||||
goto error;
|
||||
*/
|
||||
|
||||
// If we still haven't seen any blanks,
|
||||
// Output a blank line for separation
|
||||
|
Loading…
x
Reference in New Issue
Block a user