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:
parent
91e7d2960e
commit
6e9208efcd
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue