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

[Macos] Fixed range null and text Out of bounds #15063

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

klousCan
Copy link

I temporarily use try catch to get out of bounds because I'm not very good at programming in oc

What does the pull request do?

Fixed range null and text Out of bounds

What is the current behavior?

Program crashes after entering Chinese characters

What is the updated/expected behavior with this PR?

Will not crash after entering Chinese
But try catch Solving the out of bounds problem is not a good idea

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

Fixes #14222

I temporarily use try catch to get out of bounds because I'm not very good at programming in oc
@klousCan
Copy link
Author

@dotnet-policy-service agree

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0046423-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0046531-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@Gillibald
Copy link
Contributor

I do not like the try catch block here. We should be able to make sure specified range fits into current attributed text.

@klousCan
Copy link
Author

I do not like the try catch block here. We should be able to make sure specified range fits into current attributed text.

I also don't like try catch. Now I'm just fixing my existing problem, and I'm not very familiar with OC, you can fix it and merge this bug .Do I need to close this merge?

@Gillibald
Copy link
Contributor

I could not reproduce the crash when I tried to fix this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants