From 283a7f63c28109f337bd830bc73e83bb282b73dd Mon Sep 17 00:00:00 2001 From: Grazfather Date: Mon, 9 Dec 2024 02:30:40 -0500 Subject: [PATCH] reset_architecture: Force arch to lower case (#1159) The caller shouldn't need to know to make it lower case. --- gef.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gef.py b/gef.py index 166aa2302..f85b12b15 100644 --- a/gef.py +++ b/gef.py @@ -3849,7 +3849,7 @@ def reset_architecture(arch: str | None = None) -> None: # check if the architecture is forced by parameter if arch: try: - gef.arch = arches[arch]() + gef.arch = arches[arch.lower()]() gef.arch_reason = "The architecture has been set manually" except KeyError: raise OSError(f"Specified arch {arch.upper()} is not supported") @@ -4860,7 +4860,7 @@ class ArchSetCommand(GenericCommand): _example_ = f"{_cmdline_} X86" def do_invoke(self, args: list[str]) -> None: - reset_architecture(args[0].lower() if args else None) + reset_architecture(args[0] if args else None) def complete(self, text: str, word: str) -> list[str]: return sorted(x for x in __registered_architectures__.keys() if