Codechange: Object non-zero dimension check was not logically correct

This commit is contained in:
Charles Pigott 2021-08-31 21:40:05 +01:00
parent ceaff9c9f2
commit 16dca0d7bc

View File

@ -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;