From ec2c16fefa8b98efaa1ccf84f18eea0a12c1c9ef Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Mon, 30 Jan 2023 22:20:29 +0200 Subject: fix `assert()` crash (#1941) --- src/string_immutable.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/string_immutable.zig b/src/string_immutable.zig index a437baa69..e949892e1 100644 --- a/src/string_immutable.zig +++ b/src/string_immutable.zig @@ -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) { -- cgit v1.2.3