-
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
.net 5.0 seems to be wrong in detecting zero-terminzted string #45912
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
@safern, the repro goes away if I set Did we discuss this case already? |
Tagging subscribers to this area: @tarekgh, @safern, @krwq Issue DetailsThis issue has been moved from a ticket on Developer Community. [severity:It's more difficult to complete my work] [regression] [worked-in:16.7]
gives the following output for target framework .net 5.0: "abc" (3), zero-terminated: True For target framework .netcoreapp3.1 the code outputs the following lines: "abc" (3), zero-terminated: False As for me, .net core 3.1 behavior looks correct and .net 5.0 does not. Original CommentsFeedback Bot on 12/9/2020, 10:13 PM:We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps. Original Solutions(no solutions)
|
This behavior is by design. |
Thanks, @GrabYourPitchforks you beat me to it. |
@GrabYourPitchforks is right. For such operation ordinal comparison has to be used. Also why need to use EndsWith at all? why not just testing |
To be fair, EndsWith is more readable. And it works with empty strings. :) |
That is a good point. but do you consider the empty string is null terminated or not? for such user scenarios, it should be true I guess. |
This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work] [regression] [worked-in:16.7]
The following code:
gives the following output for target framework .net 5.0:
"abc" (3), zero-terminated: True
"abc" (4), zero-terminated: True
For target framework .netcoreapp3.1 the code outputs the following lines:
"abc" (3), zero-terminated: False
"abc" (4), zero-terminated: True
As for me, .net core 3.1 behavior looks correct and .net 5.0 does not.
Original Comments
Feedback Bot on 12/9/2020, 10:13 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: