1
0
Fork 0

(svn r16018) -Fix (r16014): properly escape IPv6 style ([::]) addresses so they aren't seen as new groups.

release/1.0
rubidium 2009-04-10 17:16:46 +00:00
parent c8b495fb38
commit 930bc73e7a
2 changed files with 3 additions and 1 deletions

View File

@ -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);

View File

@ -80,6 +80,7 @@ static const char *_list_group_names[] = {
"bans",
"newgrf",
"servers",
"server_bind_addresses",
NULL
};