aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lim Wee Soong2020-04-14 22:22:30 +0800
committerDaniel Lim Wee Soong2020-04-14 22:22:30 +0800
commita08881c4b0e5a90ff443901a7c00cc8bfa174c0e (patch)
tree1179eb94cf65bfa75a55c0851035fcc2343ff8f4
parent5631c5769ef8f4ee81c726133993f4b910c16ecc (diff)
downloadgef-fix-hexdump-case.tar.gz
gef-fix-hexdump-case.zip
Rename arg to arg_lowerfix-hexdump-case
-rw-r--r--gef.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/gef.py b/gef.py
index 1e1320f..3552cc2 100644
--- a/gef.py
+++ b/gef.py
@@ -7909,28 +7909,27 @@ class HexdumpCommand(GenericCommand):
reverse = False
for arg in argv:
- arg_old = arg # if it were to be assigned to target, we don't want to convert it to lower case
- arg = arg.lower()
+ arg_lower = arg.lower()
is_format_given = False
for valid_format in valid_formats:
- if valid_format.startswith(arg):
+ if valid_format.startswith(arg_lower):
fmt = valid_format
is_format_given = True
break
if is_format_given:
continue
- if "reverse".startswith(arg):
+ if "reverse".startswith(arg_lower):
reverse = True
continue
- if arg.startswith("l") or target:
- if arg.startswith("l"):
- arg = arg[1:]
+ if arg_lower.startswith("l") or target:
+ if arg_lower.startswith("l"):
+ arg_lower = arg_lower[1:]
if read_len:
self.usage()
return
- read_len = int(arg, 0)
+ read_len = int(arg_lower, 0)
continue
- target = arg_old
+ target = arg
if not target:
target="$sp"