mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
fix assert() crash (#1941)
This commit is contained in:
@@ -1419,7 +1419,7 @@ pub fn convertUTF8BytesIntoUTF16(sequence: *const [4]u8) UTF16Replacement {
|
||||
switch (len) {
|
||||
2 => {
|
||||
if (Environment.allow_assert)
|
||||
assert(sequence[0] >= 0xC2);
|
||||
assert(sequence[0] >= 0xC0);
|
||||
if (Environment.allow_assert)
|
||||
assert(sequence[0] <= 0xDF);
|
||||
if (sequence[1] < 0x80 or sequence[1] > 0xBF) {
|
||||
|
||||
Reference in New Issue
Block a user