(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).
This commit is contained in:
rubidium
2007-04-04 12:43:43 +00:00
parent db91588845
commit 3b8dd00bae
2 changed files with 6 additions and 3 deletions

View File

@@ -64,6 +64,10 @@ bool FillGRFDetails(GRFConfig *config, bool is_static)
return false;
}
if (config->filename == NULL) {
config->filename = strdup(strrchr(config->full_path, PATHSEPCHAR) + 1);
}
/* Find and load the Action 8 information */
/* 62 is the last file slot before sample.cat.
* Should perhaps be some "don't care" value */
@@ -305,7 +309,6 @@ static uint ScanPath(const char *path)
GRFConfig *c = CallocT<GRFConfig>(1);
c->full_path = strdup(filename);
c->filename = strdup(strrchr(filename, PATHSEPCHAR) + 1);
bool added = true;
if (FillGRFDetails(c, false)) {