Skip to content

Commit

Permalink
Fix for infinite loop in core:odin file tags parser when your local c…
Browse files Browse the repository at this point in the history
…opy uses \r
  • Loading branch information
karl-zylinski committed Sep 20, 2024
1 parent a4dd489 commit 9a8fb2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/odin/parser/file_tags.odin
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ parse_file_tags :: proc(file: ast.File, allocator := context.allocator) -> (tags
name_start := i

switch next_char(text, &i) {
case 0, '\n':
case 0, '\r', '\n':
i -= 1
break groups_loop
case ',':
Expand Down Expand Up @@ -164,7 +164,7 @@ parse_file_tags :: proc(file: ast.File, allocator := context.allocator) -> (tags

is_notted: bool
switch next_char(text, &i) {
case 0, '\n':
case 0, '\r', '\n':
i -= 1
break kinds_loop
case ',':
Expand Down

0 comments on commit 9a8fb2f

Please sign in to comment.