Skip to content

Commit 6a6a024

Browse files
committed
Runtime: fix caml_utf8_of_utf16 bug in high surrogate case
1 parent 246df64 commit 6a6a024

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
* Runtime: fix Int64.of_string overflow check (#1874)
5252
* Runtime: fix caml_string_concat when not using JS strings (#1874)
5353
* Runtime: consistent bigarray hashing across all architectures (#1977)
54+
* Runtime: fix caml_utf8_of_utf16 bug in high surrogate case (#2008)
5455
* Tools: fix jsoo_mktop and jsoo_mkcmis (#1877)
5556
* Toplevel: fix for when use-js-strings is disabled (#1997)
5657

runtime/js/mlBytes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function caml_utf8_of_utf16(s) {
104104
0x80 | (c & 0x3f),
105105
);
106106
} else if (
107-
c >= 0xdbff ||
107+
c > 0xdbff ||
108108
i + 1 === l ||
109109
(d = s.charCodeAt(i + 1)) < 0xdc00 ||
110110
d > 0xdfff

0 commit comments

Comments
 (0)