mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
Codechange: Object non-zero dimension check was not logically correct
This commit is contained in:
parent
ceaff9c9f2
commit
16dca0d7bc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user