Fix stringlib against non-ascii chars#184
Open
masaedw wants to merge 3 commits into
Open
Conversation
wledfor2
added a commit
to wledfor2/moonsharp
that referenced
this pull request
Oct 8, 2017
Eir-nya
added a commit
to RhenaudTheLukark/CreateYourFrisk
that referenced
this pull request
Sep 4, 2019
Merged the lovely changes from moonsharp-devs/moonsharp#184 into CYF * Fixed a bug where some `string` library functions would incorrectly match characters that only have the same lower byte as the ones you're trying to match. Fix by masaedw on GitHub
Contributor
There was a problem hiding this comment.
Added extra eyes (@Benjamin-Dobell) for review, I ran a few tests and didn't see anything out of the ordinary. Always a bit concerned when removing the byte casting here as it may be the easiest way to fix it, but uncertain (since encoding is not my forte) if this is the right way to fix this.
LimpingNinja
requested changes
Jan 16, 2020
LimpingNinja
left a comment
Contributor
There was a problem hiding this comment.
Ensure code changes on PR cover the other instances of this while we still have them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some string functions ignore upper byte of chars of strings.
This causes unexpected behaviors.
ex)
"書籍"(U+66F8, U+7C4D) matches"糸筍"(U+7CF8, U+7B4D)"[Aそ]"matches"㍝"See the test cases.
I confirmed that all test in MoonSharp.Interpreter.Tests.net35-client passed using moonsharp_dev_minimal.sln.