mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 14:18:47 +00:00
Fix for infinite loop in core:odin file tags parser when your local copy uses \r
This commit is contained in:
@@ -129,7 +129,7 @@ parse_file_tags :: proc(file: ast.File, allocator := context.allocator) -> (tags
|
|||||||
name_start := i
|
name_start := i
|
||||||
|
|
||||||
switch next_char(text, &i) {
|
switch next_char(text, &i) {
|
||||||
case 0, '\n':
|
case 0, '\r', '\n':
|
||||||
i -= 1
|
i -= 1
|
||||||
break groups_loop
|
break groups_loop
|
||||||
case ',':
|
case ',':
|
||||||
@@ -164,7 +164,7 @@ parse_file_tags :: proc(file: ast.File, allocator := context.allocator) -> (tags
|
|||||||
|
|
||||||
is_notted: bool
|
is_notted: bool
|
||||||
switch next_char(text, &i) {
|
switch next_char(text, &i) {
|
||||||
case 0, '\n':
|
case 0, '\r', '\n':
|
||||||
i -= 1
|
i -= 1
|
||||||
break kinds_loop
|
break kinds_loop
|
||||||
case ',':
|
case ',':
|
||||||
|
|||||||
Reference in New Issue
Block a user