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:
Geoff Gustafson 2018-04-04 01:17:16 -07:00 committed by László Langó
parent ff37959195
commit 634d9d38da

View File

@ -249,9 +249,9 @@ function DebuggerClient(address)
{
var chr = string.charCodeAt(i);
if (chr >= 0x7ff)
if (chr > 0x7ff)
{
byteLength ++;
byteLength++;
}
if (chr >= 0x7f)
@ -272,7 +272,7 @@ function DebuggerClient(address)
{
var chr = string.charCodeAt(i);
if (chr >= 0x7ff)
if (chr > 0x7ff)
{
result[offset] = 0xe0 | (chr >> 12);
result[offset + 1] = 0x80 | ((chr >> 6) & 0x3f);