mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-24 23:19:09 +00:00
Codechange: Object non-zero dimension check was not logically correct
This commit is contained in:
@@ -4085,8 +4085,8 @@ static ChangeInfoResult ObjectChangeInfo(uint id, int numinfo, int prop, ByteRea
|
||||
|
||||
case 0x0C: // Size
|
||||
spec->size = buf->ReadByte();
|
||||
if ((spec->size & 0xF0) == 0 || (spec->size & 0x0F) == 0) {
|
||||
grfmsg(1, "ObjectChangeInfo: Invalid object size requested (%u) for object id %u. Ignoring.", spec->size, id + i);
|
||||
if (GB(spec->size, 0, 4) == 0 || GB(spec->size, 4, 4) == 0) {
|
||||
grfmsg(0, "ObjectChangeInfo: Invalid object size requested (0x%x) for object id %u. Ignoring.", spec->size, id + i);
|
||||
spec->size = 0x11; // 1x1
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user