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

fix(linter): fix panic when directive appears at the first line #264

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

yesmeck
Copy link
Contributor

@yesmeck yesmeck commented Apr 6, 2023

Span is 0-based, while length is 1-based, so when a directive appears at the first line, subtracting the span by the length can lead to an overflow.

@Boshen Boshen merged commit 034ca98 into oxc-project:main Apr 6, 2023
@Boshen
Copy link
Member

Boshen commented Apr 6, 2023

Thank you!

@yesmeck yesmeck deleted the fix-directive-parsing branch April 6, 2023 13:08
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.

None yet

2 participants