summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-10 17:16:46 +0000
committerrubidium <rubidium@openttd.org>2009-04-10 17:16:46 +0000
commit930bc73e7a3f4cbf4dfb4ac688d77c3fef374ccd (patch)
tree3052796a5ec6ede088194dd036463b50c760c933 /src
parentc8b495fb387aa87a505760117db24884f3d24d4c (diff)
downloadopenttd-930bc73e7a3f4cbf4dfb4ac688d77c3fef374ccd.tar.xz
(svn r16018) -Fix (r16014): properly escape IPv6 style ([::]) addresses so they aren't seen as new groups.
Diffstat (limited to 'src')
-rw-r--r--src/ini.cpp3
-rw-r--r--src/settings.cpp1
2 files changed, 3 insertions, 1 deletions
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
};