Skip to content

builtin: fix typo in range in utf8_str_visible_length()#25715

Merged
spytheman merged 1 commit into
vlang:masterfrom
tankf33der:utf8_typo
Nov 12, 2025
Merged

builtin: fix typo in range in utf8_str_visible_length()#25715
spytheman merged 1 commit into
vlang:masterfrom
tankf33der:utf8_typo

Conversation

@tankf33der

Copy link
Copy Markdown
Contributor

I would like to submit this fix for review.
There is a trivial typo at the start of the range boundary and therefore the character length is calculated incorrectly. I'm not even mentioning that 0x0f9f8880 is not a valid UTF-8 sequence at all.

Added a test that cannot pass on master.

@Delta456 Delta456 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @tankf33der 🙇🏻 .

@spytheman spytheman merged commit d798e3c into vlang:master Nov 12, 2025
86 of 87 checks passed
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.

3 participants