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

Line/column number calculation regression #218

Closed
Xenomega opened this issue Apr 29, 2019 · 0 comments · Fixed by #219
Closed

Line/column number calculation regression #218

Xenomega opened this issue Apr 29, 2019 · 0 comments · Fixed by #219
Assignees
Labels
bug Something isn't working

Comments

@Xenomega
Copy link
Member

Xenomega commented Apr 29, 2019

Recent adoption of crytic-compile in slither have required some code paths to be changed. A regression can be observed in source mapping line/column calculations due to CR, LF, and CRLF line endings, as described in #194 .

The problematic code can be found here:

with open(path) as f:

The same solution described in the previous PR should be taken for all source file reading operations: retain format and line endings.

This issue currently will cause incorrect line/column number calculations in files with CRLF line endings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant