summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-04-22 13:59:21 +0000
committerDarkvater <darkvater@openttd.org>2006-04-22 13:59:21 +0000
commita98cdf97507d2593835f5a792487596fca6bb982 (patch)
treecfd201e7e0f486cce6e4161e7ef9d3bcd93dd3ca
parent5a8d992eaad001fc73d5b14a389ece7e4d95897e (diff)
downloadopenttd-a98cdf97507d2593835f5a792487596fca6bb982.tar.xz
(svn r4530) - Fix [NewGRF]: don't spew a warning when a grf file has no parameters.
-rw-r--r--settings.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/settings.c b/settings.c
index 1372eec94..3c1c88be3 100644
--- a/settings.c
+++ b/settings.c
@@ -1409,10 +1409,10 @@ const char *GRFProcessParams(const IniItem *item, uint index)
/* 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) {