Alignment mask was incorrectly checked for 1 instead of 0

This caused an `ALIGN[1]` to be ignored.
This commit is contained in:
daid
2021-03-11 12:53:08 +01:00
committed by Eldred Habert
parent 60019cf476
commit a81d383f75

View File

@@ -248,7 +248,7 @@ static void doSanityChecks(struct Section *section, void *ptr)
* Check if alignment is reasonable, this is important to avoid UB
* An alignment of zero is equivalent to no alignment, basically
*/
if (section->isAlignFixed && section->alignMask == 1)
if (section->isAlignFixed && section->alignMask == 0)
section->isAlignFixed = false;
/* Too large an alignment may not be satisfiable */