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

wrong list indexing + IndexError while scanning #4

Open
zeinlol opened this issue Nov 15, 2021 · 0 comments
Open

wrong list indexing + IndexError while scanning #4

zeinlol opened this issue Nov 15, 2021 · 0 comments

Comments

@zeinlol
Copy link

zeinlol commented Nov 15, 2021

Traceback (most recent call last):
  File "Bughound/bughound.py", line 53, in <module>
    findings = p.get_functions(verbose)
  File "Bughound/core/parser.py", line 114, in get_functions
    code_snippet+= lines[line_number]
IndexError: list index out of range

When sources doesn't handle that list start index self elements from 0, but line_number is line index, that starts from 1, so when they try to get data from last liine, thy through IndexError
Screenshot from 2021-11-15 18-58-46

and of course, because of this issue all parsed output is wrong: data is taken with a shift

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

No branches or pull requests

1 participant