summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-04-04 12:43:43 +0000
committerrubidium <rubidium@openttd.org>2007-04-04 12:43:43 +0000
commitb430c03cdd38e96d8dd94030ed2cbac4d5cccbcc (patch)
treea7cd2e3b2fdc92211af1949fc0647fb718f1f15c /src/settings.cpp
parent1c1a4bc872b1bbc18a9ebe468f30d8dade922f74 (diff)
downloadopenttd-b430c03cdd38e96d8dd94030ed2cbac4d5cccbcc.tar.xz
(svn r9561) -Fix (r9561): loading the newgrfs in openttd.cfg was broken.
Note: as the 'full' path is stored of the newgrfs, the newgrfs in the old cfgs are not made default (you have to set them again).
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 b8ae00572..08255a957 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1576,7 +1576,7 @@ static GRFConfig *GRFLoadConfig(IniFile *ini, const char *grpname, bool is_stati
for (item = group->item; item != NULL; item = item->next) {
GRFConfig *c = CallocT<GRFConfig>(1);
- c->filename = strdup(item->name);
+ c->full_path = strdup(item->name);
/* Parse parameters */
if (*item->value != '\0') {
@@ -1653,7 +1653,7 @@ static void GRFSaveConfig(IniFile *ini, const char *grpname, const GRFConfig *li
char params[512];
GRFBuildParamList(params, c, lastof(params));
- *item = ini_item_alloc(group, c->filename, strlen(c->filename));
+ *item = ini_item_alloc(group, c->full_path, strlen(c->full_path));
(*item)->value = (char*)pool_strdup(&ini->pool, params, strlen(params));
item = &(*item)->next;
}