Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
[Merge chakra-core/ChakraCore@8dd1b47365] [MERGE #3721 @jianchun] fix…
Browse files Browse the repository at this point in the history
… incorrect parameter to call ChangeStringLinguisticCase

Merge pull request #3721 from jianchun:localfix

2nd call to ChangeStringLinguisticCase() was incorrectly passing buffer
size as source length.

Fix #3531
  • Loading branch information
chakrabot authored and MSLaguana committed Sep 25, 2017
1 parent c3abd0a commit e155292
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3357,7 +3357,7 @@ namespace Js
BufferStringBuilder builder(count, scriptContext);
char16* stringBuffer = builder.DangerousGetWritableBuffer();

int count1 = PlatformAgnostic::UnicodeText::ChangeStringLinguisticCase(caseFlags, str, count, stringBuffer, count, &err);
int count1 = PlatformAgnostic::UnicodeText::ChangeStringLinguisticCase(caseFlags, str, strLength, stringBuffer, count, &err);

if (count1 <= 0)
{
Expand Down
3 changes: 3 additions & 0 deletions deps/chakrashim/core/test/Strings/stringBuiltin.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,6 @@ a = b;
Object.prototype.toUpperCase = String.prototype.toUpperCase;
var f = obj.toUpperCase();
WScript.Echo (a);

// #3531
"\u00DF".toLocaleUpperCase();

0 comments on commit e155292

Please sign in to comment.