Skip to content

Commit

Permalink
Fix bug in stringToCesu8 conversion for 0x7ff
Browse files Browse the repository at this point in the history
JerryScript-DCO-1.0-Signed-off-by: Geoff Gustafson [email protected]
  • Loading branch information
grgustaf committed Apr 3, 2018
1 parent ff37959 commit 2d49936
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jerry-debugger/jerry-client-ws.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ <h2>JerryScript HTML (WebSocket) Debugger Client</h2>
{
var chr = string.charCodeAt(i);

if (chr >= 0x7ff)
if (chr > 0x7ff)
{
byteLength ++;
byteLength++;
}

if (chr >= 0x7f)
Expand All @@ -272,7 +272,7 @@ <h2>JerryScript HTML (WebSocket) Debugger Client</h2>
{
var chr = string.charCodeAt(i);

if (chr >= 0x7ff)
if (chr > 0x7ff)
{
result[offset] = 0xe0 | (chr >> 12);
result[offset + 1] = 0x80 | ((chr >> 6) & 0x3f);
Expand Down

0 comments on commit 2d49936

Please sign in to comment.