Skip to content

Commit

Permalink
Merge pull request #397 from asivery/master
Browse files Browse the repository at this point in the history
Fix cache_adjust_FileAlignment to work with files not aligned to 0x200
  • Loading branch information
erocarrera authored Apr 8, 2024
2 parents 75f0964 + ef4486d commit ceab92e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def wrapper(*args, **kwargs):
def cache_adjust_FileAlignment(val, file_alignment):
if file_alignment < FILE_ALIGNMENT_HARDCODED_VALUE:
return val
return (int(val / 0x200)) * 0x200
return (int(val / file_alignment)) * file_alignment


@lru_cache(maxsize=2048)
Expand Down

0 comments on commit ceab92e

Please sign in to comment.