mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-22 20:05:40 +01:00
(svn r16018) -Fix (r16014): properly escape IPv6 style ([::]) addresses so they aren't seen as new groups.
This commit is contained in:
parent
c8b495fb38
commit
930bc73e7a
@ -283,7 +283,8 @@ bool IniFile::SaveToDisk(const char *filename)
|
||||
if (item->comment != NULL) fputs(item->comment, f);
|
||||
|
||||
/* protect item->name with quotes if needed */
|
||||
if (strchr(item->name, ' ') != NULL) {
|
||||
if (strchr(item->name, ' ') != NULL ||
|
||||
item->name[0] == '[') {
|
||||
fprintf(f, "\"%s\"", item->name);
|
||||
} else {
|
||||
fprintf(f, "%s", item->name);
|
||||
|
@ -80,6 +80,7 @@ static const char *_list_group_names[] = {
|
||||
"bans",
|
||||
"newgrf",
|
||||
"servers",
|
||||
"server_bind_addresses",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user