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

fix(panic): fix panic when censoring utf-8 #63

Closed
wants to merge 1 commit into from
Closed

fix(panic): fix panic when censoring utf-8 #63

wants to merge 1 commit into from

Conversation

stephenduke-care
Copy link
Contributor

@stephenduke-care stephenduke-care commented Sep 7, 2023

Summary

#43

Modified indexToRune to correctly count runes up to the given byte index. Adjusted Censor function to handle multi-byte characters properly, ensuring accurate index calculations during the censoring process. Updated incrementation of currentIndex to consider byte length, facilitating correct string iteration.

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

goaway.go Show resolved Hide resolved
@stephenduke-care
Copy link
Contributor Author

My bad, flubbed the PR and accidentally opened a new one here: #64

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.

2 participants