Mercurial > hg > openttd
changeset 3631:d037f1facfdf draft
(svn r4530) - Fix [NewGRF]: don't spew a warning when a grf file has no parameters.
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Sat, 22 Apr 2006 13:59:21 +0000 |
parents | 63048d7c5193 |
children | 6cce6f56d90b |
files | settings.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/settings.c +++ b/settings.c @@ -1409,10 +1409,10 @@ /* Loading newgrf stuff from configuration file */ c = calloc(1, sizeof(*c)); c->filename = strdup(item->name); - c->num_params = parse_intlist(item->value, (int*)c->param, lengthof(c->param)); - if (c->num_params == (byte)-1) { - ShowInfoF("ini: error in array '%s'", item->name); - c->num_params = 0; + + if (*item->value != '\0') { + c->num_params = parse_intlist(item->value, (int*)c->param, lengthof(c->param)); + if (c->num_params == (byte)-1) ShowInfoF("ini: error in array '%s'", item->name); } if (_first_grfconfig == NULL) {