mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 03:03:09 +00:00
Fix read from null pointer in CacheHash.hit
It occured when the manifest file was manually edited to include an extra file. Now it will simply copy the file name in the manifest file
This commit is contained in:
parent
f13c67bcfe
commit
0fa89dc51d
@ -186,6 +186,10 @@ pub const CacheHash = struct {
|
||||
return error.InvalidFormat;
|
||||
}
|
||||
|
||||
if (cache_hash_file.path == null) {
|
||||
cache_hash_file.path = try mem.dupe(self.alloc, u8, file_path);
|
||||
}
|
||||
|
||||
const this_file = fs.cwd().openFile(cache_hash_file.path.?, .{ .read = true }) catch {
|
||||
return error.CacheUnavailable;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user