diff options
| author | Karl Zylinski <karl@zylinski.se> | 2024-09-20 15:12:35 +0200 |
|---|---|---|
| committer | Karl Zylinski <karl@zylinski.se> | 2024-09-20 15:12:35 +0200 |
| commit | 9a8fb2fb2768db211c2aeaefe77fe45b4f91a567 (patch) | |
| tree | 79dcfca5ec9eefbc63224a01178ea3a1b7ed4fd4 | |
| parent | a4dd4892846c73d21793138f518fc4b877aebca8 (diff) | |
Fix for infinite loop in core:odin file tags parser when your local copy uses \r
| -rw-r--r-- | core/odin/parser/file_tags.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/odin/parser/file_tags.odin b/core/odin/parser/file_tags.odin index e2a07f8fb..84b172148 100644 --- a/core/odin/parser/file_tags.odin +++ b/core/odin/parser/file_tags.odin @@ -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 ',': @@ -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 ',': |