mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r7463) -Codechange: Don't load invalid NewGRF files from the configuration file; instead show a warning.
This commit is contained in:
parent
1edad40e4e
commit
4ac40e64c1
@ -1505,7 +1505,10 @@ const char *GRFProcessParams(const IniItem *item, uint index)
|
|||||||
/* Loading newgrf stuff from configuration file */
|
/* Loading newgrf stuff from configuration file */
|
||||||
c = calloc(1, sizeof(*c));
|
c = calloc(1, sizeof(*c));
|
||||||
c->filename = strdup(item->name);
|
c->filename = strdup(item->name);
|
||||||
FillGRFDetails(c);
|
if (!FillGRFDetails(c)) {
|
||||||
|
ShowInfoF("ini: ignoring invalid NewGRF '%s'", c->filename);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (*item->value != '\0') {
|
if (*item->value != '\0') {
|
||||||
c->num_params = parse_intlist(item->value, (int*)c->param, lengthof(c->param));
|
c->num_params = parse_intlist(item->value, (int*)c->param, lengthof(c->param));
|
||||||
|
Loading…
Reference in New Issue
Block a user