diff options
author | rubidium <rubidium@openttd.org> | 2009-04-10 17:16:46 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-10 17:16:46 +0000 |
commit | 930bc73e7a3f4cbf4dfb4ac688d77c3fef374ccd (patch) | |
tree | 3052796a5ec6ede088194dd036463b50c760c933 /src/ini.cpp | |
parent | c8b495fb387aa87a505760117db24884f3d24d4c (diff) | |
download | openttd-930bc73e7a3f4cbf4dfb4ac688d77c3fef374ccd.tar.xz |
(svn r16018) -Fix (r16014): properly escape IPv6 style ([::]) addresses so they aren't seen as new groups.
Diffstat (limited to 'src/ini.cpp')
-rw-r--r-- | src/ini.cpp | 3 |
1 files changed, 2 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); |