mirror of https://github.com/OpenTTD/OpenTTD
(svn r22138) -Fix: skipping only the invalid part of an action14 failed, the rest of the action was skipped instead
parent
7d40c99378
commit
89ff97f70a
|
@ -6726,6 +6726,8 @@ static bool ChangeGRFParamValueNames(ByteReader *buf)
|
||||||
if (type != 'T' || id > _cur_parameter->max_value) {
|
if (type != 'T' || id > _cur_parameter->max_value) {
|
||||||
grfmsg(2, "StaticGRFInfo: all child nodes of 'INFO'->'PARA'->param_num->'VALU' should have type 't' and the value/bit number as id");
|
grfmsg(2, "StaticGRFInfo: all child nodes of 'INFO'->'PARA'->param_num->'VALU' should have type 't' and the value/bit number as id");
|
||||||
if (!SkipUnknownInfo(buf, type)) return false;
|
if (!SkipUnknownInfo(buf, type)) return false;
|
||||||
|
type = buf->ReadByte();
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte langid = buf->ReadByte();
|
byte langid = buf->ReadByte();
|
||||||
|
@ -6769,7 +6771,9 @@ static bool HandleParameterInfo(ByteReader *buf)
|
||||||
uint32 id = buf->ReadDWord();
|
uint32 id = buf->ReadDWord();
|
||||||
if (type != 'C' || id >= _cur_grfconfig->num_valid_params) {
|
if (type != 'C' || id >= _cur_grfconfig->num_valid_params) {
|
||||||
grfmsg(2, "StaticGRFInfo: all child nodes of 'INFO'->'PARA' should have type 'C' and their parameter number as id");
|
grfmsg(2, "StaticGRFInfo: all child nodes of 'INFO'->'PARA' should have type 'C' and their parameter number as id");
|
||||||
return SkipUnknownInfo(buf, type);
|
if (!SkipUnknownInfo(buf, type)) return false;
|
||||||
|
type = buf->ReadByte();
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id >= _cur_grfconfig->param_info.Length()) {
|
if (id >= _cur_grfconfig->param_info.Length()) {
|
||||||
|
|
Loading…
Reference in New Issue