From 1a2ef594b38a3c77c384e9d4dbf091d45d904951 Mon Sep 17 00:00:00 2001 From: mancha Date: Wed, 18 Mar 2015 06:25:33 +0000 Subject: [PATCH] Fix bug in hexdump when called with a byte count parameter --- peda.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/peda.py b/peda.py index 2f99a30..dd38fbc 100644 --- a/peda.py +++ b/peda.py @@ -3276,12 +3276,13 @@ class PEDACmd(object): if address is None: self._missing_argument() - if count and count.startswith("/"): + if count is None: + count = 16 + + if not to_int(count) and count.startswith("/"): count = to_int(count[1:]) count = count * 16 if count else None - if count is None: - count = 16 bytes = peda.dumpmem(address, address+count) if bytes is None: warning_msg("cannot retrieve memory content")