Skip to content

Commit

Permalink
Merge pull request #416 from j-t-1/get_overlay_data_start_offset
Browse files Browse the repository at this point in the history
Use chaining comparison operators
  • Loading branch information
erocarrera authored Aug 26, 2024
2 parents d0e477f + 0b81748 commit 79200c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7835,9 +7835,7 @@ def get_overlay_data_start_offset(self):
def update_if_sum_is_larger_and_within_file(
offset_and_size, file_size=len(self.__data__)
):
if sum(offset_and_size) <= file_size and sum(offset_and_size) > sum(
largest_offset_and_size
):
if sum(largest_offset_and_size) < sum(offset_and_size) <= file_size:
return offset_and_size
return largest_offset_and_size

Expand Down

0 comments on commit 79200c5

Please sign in to comment.