Simplify test for corrupt IFF file

clang rightly warns for `if (!var&1)`, which parses as `if (!(var &
1))`, which is probably not what the original author intended.
Unfortunately, the author never commented what *was* intended.  The
author might have meant to reject any row with an even length (`if
(!(var & 1))`, but that seems strange in this context.  Remove the `&
1`, which retains the sense of what the code has always done.
This commit is contained in:
Kp 2018-04-03 03:20:08 +00:00
parent 91e7d2960e
commit 6e9208efcd

View file

@ -314,7 +314,7 @@ static int parse_delta(PHYSFS_File *ifile,long len,iff_bitmap_header *bmheader)
}
if (cnt == -1) {
if (!bmheader->w&1)
if (!bmheader->w)
return IFF_CORRUPT;
}
else if (cnt)