-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 accidental closure in Regex.Replace #50512
Conversation
And sprinkle some "static" around to help avoid this in the future.
Tagging subscribers to this area: @eerhardt, @pgovind Issue DetailsAnd sprinkle some "static" around to help avoid this in the future.
|
{ | ||
state.segments.Add(state.input.AsMemory(match.Index + match.Length, state.prevat - match.Index - match.Length)); | ||
state.prevat = match.Index; | ||
state.segments.Add(evaluator(match).AsMemory()); | ||
state.segments.Add(state.evaluator(match).AsMemory()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious about how you found this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wednesdays are a busy meeting day for me, and I find my mind is able to stay more focused on them if I give it little mindless side projects, like walking in ILSpy through all "DisplayClass"es in all of netcoreapp looking for ones that don't belong :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next task is to look a dumps all day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty straightforward. LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The use of "static" is not so obvious. Do you already have an idea to make an analyzer for this? |
And sprinkle some "static" around to help avoid this in the future.