From 2bf489b939e1f02a9e79eaf0e99bf896e3b4ab04 Mon Sep 17 00:00:00 2001 From: ValekoZ Date: Sun, 9 Jun 2024 20:21:37 +0200 Subject: [PATCH] fix nits --- gef.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gef.py b/gef.py index 4da5a10e0..2a8de6c1b 100644 --- a/gef.py +++ b/gef.py @@ -8912,8 +8912,8 @@ class ArgType(enum.Enum): for entry in vmmap: names_filter = [f"name = '{x}'" for x in names if x in entry.path] - addrs_filter = [f"addr = " + self.format_addr_filter(arg, addr) for arg, addr in addrs.items() - if addr >= entry.page_start and addr < entry.page_end] + addrs_filter = [f"addr = {self.format_addr_filter(arg, addr)}" for arg, addr in addrs.items() + if entry.page_start <= addr < entry.page_end] filters = names_filter + addrs_filter filter_content = f"[{' & '.join(filters)}]" @@ -8930,10 +8930,8 @@ class ArgType(enum.Enum): gef_print() return - def format_addr_filter(self, arg, addr): - if self.is_integer(arg): - return f"`{arg}`" - return f"`{arg}` ({addr:#x})" + def format_addr_filter(self, arg: str, addr: int): + return f"`{arg}`" if self.is_integer(arg) else f"`{arg}` ({addr:#x})" def print_entry(self, entry: Section) -> None: line_color = ""