Codefix: [NewGRF] Don't read an extended byte into uint8_t. (#13302)

This commit is contained in:
Peter Nelson 2025-01-11 15:53:24 +00:00 committed by GitHub
parent 8b664a42b0
commit 11529d865b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5051,8 +5051,8 @@ static void ReserveChangeInfo(ByteReader &buf)
if (feature != GSF_CARGOES && feature != GSF_GLOBALVAR && feature != GSF_RAILTYPES && feature != GSF_ROADTYPES && feature != GSF_TRAMTYPES) return;
uint8_t numprops = buf.ReadByte();
uint8_t numinfo = buf.ReadByte();
uint8_t index = buf.ReadExtendedByte();
uint8_t numinfo = buf.ReadByte();
uint16_t index = buf.ReadExtendedByte();
while (numprops-- && buf.HasData()) {
uint8_t prop = buf.ReadByte();