Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset_architecture: Force arch to lower case #1159

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down
Loading