Skip to content

Commit a95cdcc

Browse files
committed
reset_architecture: Force arch to lower case
1 parent 29884e3 commit a95cdcc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gef.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3849,7 +3849,7 @@ def reset_architecture(arch: str | None = None) -> None:
38493849
# check if the architecture is forced by parameter
38503850
if arch:
38513851
try:
3852-
gef.arch = arches[arch]()
3852+
gef.arch = arches[arch.lower()]()
38533853
gef.arch_reason = "The architecture has been set manually"
38543854
except KeyError:
38553855
raise OSError(f"Specified arch {arch.upper()} is not supported")
@@ -4859,8 +4859,8 @@ class ArchSetCommand(GenericCommand):
48594859
_syntax_ = f"{_cmdline_} <arch>"
48604860
_example_ = f"{_cmdline_} X86"
48614861

4862-
def do_invoke(self, args: list[str]) -> None:
4863-
reset_architecture(args[0].lower() if args else None)
4862+
def do_invoke(self, args: List[str]) -> None:
4863+
reset_architecture(args[0] if args else None)
48644864

48654865
def complete(self, text: str, word: str) -> list[str]:
48664866
return sorted(x for x in __registered_architectures__.keys() if

0 commit comments

Comments
 (0)