Skip to content

Commit 322ec61

Browse files
committed
fixup! Runtime: fix caml_utf8_of_utf16 bug in high surrogate case
1 parent ebba622 commit 322ec61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/js/mlBytes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function caml_utf16_of_utf8(s) {
157157
c = c2 + (c << 6);
158158
if (c1 < 0xf0) {
159159
v = c - 0xe2080;
160-
if (v < 0x800 || (v >= 0xd7ff && v < 0xe000)) v = 2;
160+
if (v < 0x800 || (v > 0xd7ff && v < 0xe000)) v = 2;
161161
} else {
162162
v = 3;
163163
if (

0 commit comments

Comments
 (0)