(svn r4531) - Fix [NewGRF]: overzealous fixing, reset num_params to 0 from -1 when parsing the parameter list fails.

This commit is contained in:
Darkvater 2006-04-22 14:06:46 +00:00
parent a98cdf9750
commit 4be0b3a5f3
1 changed files with 4 additions and 1 deletions

View File

@ -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) {