mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-10 06:52:05 +01:00
Change: Explicitly reserve sprite group types >= 0x80. (#14836)
The NewGRF spec does not mention that sprite group `type` and the `num-ent1` fields are the same. Reserve all unrecognised special types in case they are wanted at some point.
This commit is contained in:
@@ -525,6 +525,11 @@ static void NewSpriteGroup(ByteReader &buf)
|
|||||||
/* Neither a variable or randomized sprite group... must be a real group */
|
/* Neither a variable or randomized sprite group... must be a real group */
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
if (type >= 0x80) {
|
||||||
|
GrfMsg(0, "NewSpriteGroup: Reserved group type 0x{:02X}, skipping", type);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (feature) {
|
switch (feature) {
|
||||||
case GSF_TRAINS:
|
case GSF_TRAINS:
|
||||||
case GSF_ROADVEHICLES:
|
case GSF_ROADVEHICLES:
|
||||||
|
|||||||
Reference in New Issue
Block a user