Skip to content

Commit

Permalink
Merge pull request #4370 from IllusionMan1212/allow-e000-codepoint
Browse files Browse the repository at this point in the history
fix(core:{odin,c}/tokenizer): Don't error on valid \uE000 codepoint
  • Loading branch information
gingerBill authored Oct 19, 2024
2 parents e79f94c + d52e0a8 commit b6cbdf7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/c/frontend/tokenizer/tokenizer.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion core/odin/tokenizer/tokenizer.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b6cbdf7

Please sign in to comment.