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

Fixed a crash due to Atom source being null when reading source length. #172

Merged
merged 1 commit into from
Jan 10, 2019

Conversation

sskodje
Copy link
Contributor

@sskodje sskodje commented Dec 26, 2018

In certain situations, the Source of scriptsAtom is null, like on {\hat T}. This causes the nullreference exception. I'm not clear on wheter it's supposed to be able to null or not, but i believe "position - initialPosition" should always be equal to the source length anyway.

@ForNeVeR ForNeVeR self-requested a review December 30, 2018 08:03
@ForNeVeR ForNeVeR self-assigned this Dec 30, 2018
@ForNeVeR
Copy link
Owner

ForNeVeR commented Jan 7, 2019

Yes, it is intended to sometimes have null value, that's right.

I'm thinking about including and introducing JetBrains external annotations for our code to mark what is nullable and what isn't, but at the same time, C# 8 should be released soonish and we'll be able to do the same annotations with native C# syntax.

So, for now, I'll go ahead, add test for this case and merge your PR. Thanks a lot for your contribution!

@ForNeVeR ForNeVeR merged commit 76c5961 into ForNeVeR:master Jan 10, 2019
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