File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -97,14 +97,14 @@ function caml_utf8_of_utf16(s) {
9797 if ( c < 0x800 ) {
9898 t += String . fromCharCode ( 0xc0 | ( c >> 6 ) ) ;
9999 t += String . fromCharCode ( 0x80 | ( c & 0x3f ) ) ;
100- } else if ( c < 0xd800 || c >= 0xdfff ) {
100+ } else if ( c < 0xd800 || c > 0xdfff ) {
101101 t += String . fromCharCode (
102102 0xe0 | ( c >> 12 ) ,
103103 0x80 | ( ( c >> 6 ) & 0x3f ) ,
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
You can’t perform that action at this time.
0 commit comments