summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-19 12:50:02 +0000
committerrubidium <rubidium@openttd.org>2008-04-19 12:50:02 +0000
commitbfd2cac6e2cc81d3f7b17d17e7f7ad9722a6674c (patch)
tree2a67de4cb8e5e459437c6aee723aacba825c22e8 /src/settings.cpp
parent0670ec6ee1489077e36f6a9af04af7c3f5f15de8 (diff)
downloadopenttd-bfd2cac6e2cc81d3f7b17d17e7f7ad9722a6674c.tar.xz
(svn r12785) -Codechange: put all news-type related constants in the same array. Patch by cirdan.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 307db3ecc..322b4014b 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1667,7 +1667,7 @@ static uint NewsDisplayLoadConfig(IniFile *ini, const char *grpname)
for (item = group->item; item != NULL; item = item->next) {
int news_item = -1;
for (int i = 0; i < NT_END; i++) {
- if (strcasecmp(item->name, _news_display_name[i]) == 0) {
+ if (strcasecmp(item->name, _news_type_data[i].name) == 0) {
news_item = i;
break;
}
@@ -1760,7 +1760,7 @@ static void NewsDisplaySaveConfig(IniFile *ini, const char *grpname, uint news_d
value = (v == 0 ? "off" : (v == 1 ? "summarized" : "full"));
- *item = ini_item_alloc(group, _news_display_name[i], strlen(_news_display_name[i]));
+ *item = ini_item_alloc(group, _news_type_data[i].name, strlen(_news_type_data[i].name));
(*item)->value = (char*)pool_strdup(&ini->pool, value, strlen(value));
item = &(*item)->next;
}