mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r4530) - Fix [NewGRF]: don't spew a warning when a grf file has no parameters.
This commit is contained in:
parent
5a8d992eaa
commit
a98cdf9750
@ -1409,10 +1409,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);
|
||||||
c->num_params = parse_intlist(item->value, (int*)c->param, lengthof(c->param));
|
|
||||||
if (c->num_params == (byte)-1) {
|
if (*item->value != '\0') {
|
||||||
ShowInfoF("ini: error in array '%s'", item->name);
|
c->num_params = parse_intlist(item->value, (int*)c->param, lengthof(c->param));
|
||||||
c->num_params = 0;
|
if (c->num_params == (byte)-1) ShowInfoF("ini: error in array '%s'", item->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_first_grfconfig == NULL) {
|
if (_first_grfconfig == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user