| ... | ... | @@ -123,7 +123,7 @@ fn findPrefixResolved(cache: *const Cache, resolved_path: []u8) !PrefixedPath { |
| 123 | 123 | var i: u8 = 1; // Start at 1 to skip over checking the null prefix. |
| 124 | 124 | while (i < prefixes_slice.len) : (i += 1) { |
| 125 | 125 | const p = prefixes_slice[i].path.?; |
| 126 | | if (mem.startsWith(u8, resolved_path, p)) { |
| 126 | if (p.len > 0 and mem.startsWith(u8, resolved_path, p)) { |
| 127 | 127 | // +1 to skip over the path separator here |
| 128 | 128 | const sub_path = try gpa.dupe(u8, resolved_path[p.len + 1 ..]); |
| 129 | 129 | gpa.free(resolved_path); |