Skip to content

Commit

Permalink
Fix bug in hexdump when called with a byte count parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mancha1 committed Mar 18, 2015
1 parent 8c831be commit 1a2ef59
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions peda.py
Original file line number Diff line number Diff line change
Expand Up @@ -3276,12 +3276,13 @@ def ascii_char(ch):
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")
Expand Down

0 comments on commit 1a2ef59

Please sign in to comment.