mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-13 02:52:37 +00:00
parent
ef8455f549
commit
d865916a07
@ -7941,8 +7941,14 @@ static bool ChangeGRFParamLimits(size_t len, ByteReader *buf)
|
||||
grfmsg(2, "StaticGRFInfo: expected 8 bytes for 'INFO'->'PARA'->'LIMI' but got " PRINTF_SIZE ", ignoring this field", len);
|
||||
buf->Skip(len);
|
||||
} else {
|
||||
_cur_parameter->min_value = buf->ReadDWord();
|
||||
_cur_parameter->max_value = buf->ReadDWord();
|
||||
uint32 min_value = buf->ReadDWord();
|
||||
uint32 max_value = buf->ReadDWord();
|
||||
if (min_value <= max_value) {
|
||||
_cur_parameter->min_value = min_value;
|
||||
_cur_parameter->max_value = max_value;
|
||||
} else {
|
||||
grfmsg(2, "StaticGRFInfo: 'INFO'->'PARA'->'LIMI' values are incoherent, ignoring this field");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user