guard against relative path nodes

This commit is contained in:
Nikita Smith
2026-06-02 12:10:17 -07:00
committed by Ryan Fleury
parent e17bcd3058
commit bcf248682c
3 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -1243,7 +1243,7 @@ rb_thread_entry_point(void *p)
}
PathStyle path_style = PathStyle_SystemAbsolute;
if (str8_match_wildcard(top_part, str8_lit("?:"), 0)) { path_style = PathStyle_WindowsAbsolute; }
else if(str8_match(top_part, str8_lit("/"), 0)) { path_style = PathStyle_UnixAbsolute; }
else if(str8_match_wildcard(top_part, str8_lit("/*"), 0)) { path_style = PathStyle_UnixAbsolute; }
String8 path = str8_from_rdi_path_node_idx(scratch.arena, rdi, path_style, src_file->file_path_node_idx);
str8_list_pushf(arena, &output_blobs, "[inlined] %S %S:%u\n", inline_name, path, inline_line.line_num);
@@ -1266,7 +1266,7 @@ rb_thread_entry_point(void *p)
}
PathStyle path_style = PathStyle_SystemAbsolute;
if (str8_match_wildcard(top_part, str8_lit("?:"), 0)) { path_style = PathStyle_WindowsAbsolute; }
else if(str8_match(top_part, str8_lit("/"), 0)) { path_style = PathStyle_UnixAbsolute; }
else if(str8_match_wildcard(top_part, str8_lit("/*"), 0)) { path_style = PathStyle_UnixAbsolute; }
String8 path = str8_from_rdi_path_node_idx(scratch.arena, rdi, path_style, src_file->file_path_node_idx);
str8_list_pushf(arena, &output_blobs, "%S:%u\n", path, line.line_num);