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

Update leafblower.py #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sparrow-labz
Copy link

Fixes value error on line 386 using registers.index,
First index will always be zero, which causes error, try except now catches that, and script works for format strings

fixes value error on line 386 using registers.index, first index will always be zero, which causes error, try except now catches that, and script works for format strings
try:
register_index = registers.index(register_used[0].toString())
except ValueError:
print("List does not contain value")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sparrow-labz Thanks for submitting the pull request. I don't think I've ever run across this error so I'm wondering if it's an architecture problem? (arm vs x86 vs etc) Could you give a little background on how you ran across this and maybe provide the binary? Regardless, this looks like it should still throw an exception since the ValueError exception would result in register_index not being declared but is used in the FormatFunction instantiation a few lines below.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran leafblower on an arm bootloader binary for an older Samsung phone, from the A series. I'll try to find the binary, and add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants