Fix bug in stringToCesu8 conversion for 0x7ff (#2267)
JerryScript-DCO-1.0-Signed-off-by: Geoff Gustafson geoff@linux.intel.com
This commit is contained in:
committed by
László Langó
parent
ff37959195
commit
634d9d38da
@@ -249,9 +249,9 @@ function DebuggerClient(address)
|
|||||||
{
|
{
|
||||||
var chr = string.charCodeAt(i);
|
var chr = string.charCodeAt(i);
|
||||||
|
|
||||||
if (chr >= 0x7ff)
|
if (chr > 0x7ff)
|
||||||
{
|
{
|
||||||
byteLength ++;
|
byteLength++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chr >= 0x7f)
|
if (chr >= 0x7f)
|
||||||
@@ -272,7 +272,7 @@ function DebuggerClient(address)
|
|||||||
{
|
{
|
||||||
var chr = string.charCodeAt(i);
|
var chr = string.charCodeAt(i);
|
||||||
|
|
||||||
if (chr >= 0x7ff)
|
if (chr > 0x7ff)
|
||||||
{
|
{
|
||||||
result[offset] = 0xe0 | (chr >> 12);
|
result[offset] = 0xe0 | (chr >> 12);
|
||||||
result[offset + 1] = 0x80 | ((chr >> 6) & 0x3f);
|
result[offset + 1] = 0x80 | ((chr >> 6) & 0x3f);
|
||||||
|
|||||||
Reference in New Issue
Block a user