mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-01-14 15:48:11 +03:00
pefixup: Assert that IMAGE_SCN_ALIGN_MASK isn't required anymore.
This commit is contained in:
parent
17683bff97
commit
47fe4a8063
@ -11,7 +11,7 @@ for path in sys.argv[1:]:
|
|||||||
for section in pe.sections:
|
for section in pe.sections:
|
||||||
if section.Name.decode("utf-8")[0:5] == ".text":
|
if section.Name.decode("utf-8")[0:5] == ".text":
|
||||||
section.Characteristics &= ~pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_CNT_INITIALIZED_DATA']
|
section.Characteristics &= ~pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_CNT_INITIALIZED_DATA']
|
||||||
section.Characteristics &= ~pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_ALIGN_MASK']
|
assert not (section.Characteristics & pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_ALIGN_MASK'])
|
||||||
|
|
||||||
pe.OPTIONAL_HEADER.CheckSum = pe.generate_checksum()
|
pe.OPTIONAL_HEADER.CheckSum = pe.generate_checksum()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user