summaryrefslogtreecommitdiff
path: root/settings.c
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2005-01-05 11:19:57 +0000
committerdominik <dominik@openttd.org>2005-01-05 11:19:57 +0000
commit61761cfab12d772a72e5cd2a17b7beb5a9a1ebf8 (patch)
tree52f9336dd1acd0ea4529d4c48ead4492ffe9f325 /settings.c
parent87e5984ae218e23a93e070d061faa62a57f782e1 (diff)
downloadopenttd-61761cfab12d772a72e5cd2a17b7beb5a9a1ebf8.tar.xz
(svn r1384) Fix: Sometimes when lists were saved, a lot of blank lines had been added
Diffstat (limited to 'settings.c')
-rw-r--r--settings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/settings.c b/settings.c
index 816f73dca..3ff3fecb1 100644
--- a/settings.c
+++ b/settings.c
@@ -962,7 +962,7 @@ static void SaveList(IniFile *ini, const char *grpname, char **list, int len)
if (!group)
return;
for (i = 0; i != len; i++) {
- if (list[i] == '\0') continue;
+ if (list[i] == NULL || list[i][0] == '\0') continue;
if (first) { // add first item to the head of the group
item = ini_item_alloc(group, list[i], strlen(list[i]));