summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
};