diff --git a/pefile.py b/pefile.py index f2efd2b..4b5ccc8 100644 --- a/pefile.py +++ b/pefile.py @@ -6409,10 +6409,10 @@ def get_data(self, rva=0, length=None): s = self.get_section_by_rva(rva) - if length: - end = rva + length - else: + if length is None: end = None + else: + end = rva + length if not s: if rva < len(self.header):