fixing bug in wcssstr#3549
Merged
chakrabot merged 1 commit intoAug 21, 2017
Merged
Conversation
|
@mike-kaufman, |
| result += validate(PAL_wcsstr((const char16_t *)NULL, (const char16_t *)NULL), NULL, u"test7"); | ||
| result += validate(PAL_wcsstr((const char16_t *)NULL, u""), NULL, u"test8"); | ||
| result += validate(PAL_wcsstr(u"", (const char16_t *)NULL), NULL, u"test9"); | ||
| result += validate(PAL_wcsstr(u"abcdefg", u""), u"abcdefg", u"test10"); |
Contributor
There was a problem hiding this comment.
These are good- i would also add cases for "abcdefg", "abcdefg", "", "" and "", "def"
a870f6f to
561b04d
Compare
MSLaguana
reviewed
Aug 21, 2017
| if (*strCharSet == 0) | ||
| { | ||
| ret = (char16_t *)string; | ||
| if (*strCharSet == 0) { |
Contributor
There was a problem hiding this comment.
This looks like an unintentional change, the curly brace should start on the line after the if
MSLaguana
reviewed
Aug 21, 2017
|
|
||
| build_type = sys.argv[1] | ||
| if sys.argv[2] != None: | ||
| if sys.argv.__len__() > 2 and sys.argv[2] != None: |
Contributor
There was a problem hiding this comment.
Is this change required?
Contributor
Author
There was a problem hiding this comment.
I believe so. I was getting failures when running the tests that used this about teh index being out of bounds. Adding this checked made that error go away.
MSLaguana
approved these changes
Aug 21, 2017
Fixing chakra-core#3434. Bug in wcsstr would return a match if the string being searched ended with a prefix of the search string. Also, fixing another bug with compat with win32 API. If search string is zero length, we should return the input string. Added tests to test_native.sh to verify behavior of wcsstr.
4e6b338 to
67b1cb4
Compare
chakrabot
pushed a commit
that referenced
this pull request
Aug 21, 2017
Merge pull request #3549 from mike-kaufman:build/mkaufman/fix-wcsstr-bug-gh-3434-rebased Fixing #3434.. Bug in wcsstr would return a match if the string being searched ended with a prefix of the search string. Fixed this to behave correctly. Also added tests to test_native.sh to verify this. This is re-opened from PR #3542.
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.
Fixing #3434.. Bug in wcsstr would return a match if the string being searched ended with a prefix of the search string. Fixed this to behave correctly. Also added tests to test_native.sh to verify this.
This is re-opened from PR #3542.