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

pull/155/head
Darkvater 18 years ago
parent ae828f869a
commit 52d790f8e2

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

Loading…
Cancel
Save