Skip to content

Commit

Permalink
Merge pull request #4275 from karl-zylinski/fix-file-tags-infinite-loop
Browse files Browse the repository at this point in the history
Fix for infinite loop in core:odin file tags parser when a file uses \r
  • Loading branch information
gingerBill authored Sep 20, 2024
2 parents 2c5be4e + 9a8fb2f commit c1264c2
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 c1264c2

Please sign in to comment.