Mercurial > hg > openttd
changeset 11638:6e294b4b7f56 draft
(svn r16018) -Fix (r16014): properly escape IPv6 style ([::]) addresses so they aren't seen as new groups.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Fri, 10 Apr 2009 17:16:46 +0000 |
parents | c8133174cf71 |
children | 76b8ffa75eca |
files | src/ini.cpp src/settings.cpp |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ini.cpp +++ b/src/ini.cpp @@ -283,7 +283,8 @@ 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);