From 930bc73e7a3f4cbf4dfb4ac688d77c3fef374ccd Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 10 Apr 2009 17:16:46 +0000 Subject: (svn r16018) -Fix (r16014): properly escape IPv6 style ([::]) addresses so they aren't seen as new groups. --- src/ini.cpp | 3 ++- src/settings.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ini.cpp b/src/ini.cpp index 9df83fdc1..723b4d00b 100644 --- a/src/ini.cpp +++ b/src/ini.cpp @@ -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); diff --git a/src/settings.cpp b/src/settings.cpp index a8e8c9117..7df70d7c1 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -80,6 +80,7 @@ static const char *_list_group_names[] = { "bans", "newgrf", "servers", + "server_bind_addresses", NULL }; -- cgit v1.2.3-70-g09d2