Explorar el Código

Fix for infinite loop in core:odin file tags parser when your local copy uses \r

Karl Zylinski hace 11 meses
padre
commit
9a8fb2fb27
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      core/odin/parser/file_tags.odin

+ 2 - 2
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 ',':