Skip to content

Commit

Permalink
reset_architecture: Force arch to lower case
Browse files Browse the repository at this point in the history
  • Loading branch information
Grazfather committed Nov 30, 2024
1 parent ba70548 commit cb01341
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -3844,7 +3844,7 @@ def reset_architecture(arch: Optional[str] = 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")
Expand Down Expand Up @@ -4862,7 +4862,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
Expand Down

0 comments on commit cb01341

Please sign in to comment.