mirror of https://github.com/OpenTTD/OpenTTD
(svn r21370) -Fix: [NewGRF] a grf with an invalid action14 could cause an out of memory error
parent
6f549e54b5
commit
3df30280d4
|
@ -6697,7 +6697,7 @@ 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");
|
||||||
if (!SkipUnknownInfo(buf, type)) return false;
|
return SkipUnknownInfo(buf, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id >= _cur_grfconfig->param_info.Length()) {
|
if (id >= _cur_grfconfig->param_info.Length()) {
|
||||||
|
|
Loading…
Reference in New Issue