Item with prefix causes out of range exception#53425
Merged
dibarbet merged 1 commit intodotnet:mainfrom May 14, 2021
Merged
Conversation
Contributor
|
@dibarbet can you take a look? A test sounds also be good here |
dibarbet
approved these changes
May 14, 2021
Member
dibarbet
left a comment
There was a problem hiding this comment.
🤦 good catch
I will approve this PR so we can get the fix merged before Monday, I'll followup today with a few more test cases for this.
dibarbet
added a commit
to dibarbet/roslyn
that referenced
this pull request
May 14, 2021
Member
|
Merging this PR, added a test in #53428 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bug was introduced here https://github.com/dotnet/roslyn/pull/53279/files#diff-f3fdd4b27af7f22c725fec19321e1c0e1b66e4ea9e66b9ce1218b8574605b78cR109 which causes out of range exception on any item with a prefix because the length of the prefix is not subtracted from the overall length.
(byte)has prefix(and only the length ofbyte)should be taken, not the length of(byte)