mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Silence UndefinedBehaviourSanitizer warning in ChangeGRFParamType
This commit is contained in:
parent
4326cde313
commit
72c67a89ba
@ -9213,9 +9213,9 @@ static bool ChangeGRFParamType(size_t len, ByteReader *buf)
|
||||
GrfMsg(2, "StaticGRFInfo: expected 1 byte for 'INFO'->'PARA'->'TYPE' but got {}, ignoring this field", len);
|
||||
buf->Skip(len);
|
||||
} else {
|
||||
GRFParameterType type = (GRFParameterType)buf->ReadByte();
|
||||
uint8_t type = buf->ReadByte();
|
||||
if (type < PTYPE_END) {
|
||||
_cur_parameter->type = type;
|
||||
_cur_parameter->type = (GRFParameterType)type;
|
||||
} else {
|
||||
GrfMsg(3, "StaticGRFInfo: unknown parameter type {}, ignoring this field", type);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user