diff options
author | Darkvater <darkvater@openttd.org> | 2006-04-22 14:06:46 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-04-22 14:06:46 +0000 |
commit | 4be0b3a5f33cd206e4a0105e5b5077c290d0596e (patch) | |
tree | b35703a25babb376b273e76da0bdcbf36cf3a9f2 | |
parent | a98cdf97507d2593835f5a792487596fca6bb982 (diff) | |
download | openttd-4be0b3a5f33cd206e4a0105e5b5077c290d0596e.tar.xz |
(svn r4531) - Fix [NewGRF]: overzealous fixing, reset num_params to 0 from -1 when parsing the parameter list fails.
-rw-r--r-- | settings.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/settings.c b/settings.c index 3c1c88be3..4f0c89e25 100644 --- a/settings.c +++ b/settings.c @@ -1412,7 +1412,10 @@ const char *GRFProcessParams(const IniItem *item, uint index) 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 (c->num_params == (byte)-1) { + ShowInfoF("ini: error in array '%s'", item->name); + c->num_params = 0; + } } if (_first_grfconfig == NULL) { |