diff --git a/core/c/frontend/tokenizer/tokenizer.odin b/core/c/frontend/tokenizer/tokenizer.odin index 2415e06a0..558077717 100644 --- a/core/c/frontend/tokenizer/tokenizer.odin +++ b/core/c/frontend/tokenizer/tokenizer.odin @@ -291,7 +291,7 @@ scan_escape :: proc(t: ^Tokenizer) -> bool { n -= 1 } - if x > max || 0xd800 <= x && x <= 0xe000 { + if x > max || 0xd800 <= x && x <= 0xdfff { error_offset(t, offset, "escape sequence is an invalid Unicode code point") return false } diff --git a/core/odin/tokenizer/tokenizer.odin b/core/odin/tokenizer/tokenizer.odin index c3a30581c..d4da82c56 100644 --- a/core/odin/tokenizer/tokenizer.odin +++ b/core/odin/tokenizer/tokenizer.odin @@ -331,7 +331,7 @@ scan_escape :: proc(t: ^Tokenizer) -> bool { n -= 1 } - if x > max || 0xd800 <= x && x <= 0xe000 { + if x > max || 0xd800 <= x && x <= 0xdfff { error(t, offset, "escape sequence is an invalid Unicode code point") return false }