authorgravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-05-02 00:00:32-06:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-05-25 13:48:43-04:00
log72716ecc3a1f236fc46d754fa7387317c40aade5
treef87c8a8303f2da03d3fe4bb2c191a569eb834cf6
parentc3c332c9ecf8ab982ca1b704a54b7d1b439b520d

Fix improper initialization of CacheHashFiles


1 files changed, 4 insertions(+), 0 deletions(-)

lib/std/cache_hash.zig+4
......@@ -103,6 +103,7 @@ pub const CacheHash = struct {
103103 var cache_hash_file = try self.files.addOne();
104104 cache_hash_file.path = try fs.path.resolve(self.alloc, &[_][]const u8{file_path});
105105 cache_hash_file.max_file_size = max_file_size;
106 cache_hash_file.contents = null;
106107
107108 self.addSlice(cache_hash_file.path.?);
108109
......@@ -175,6 +176,7 @@ pub const CacheHash = struct {
175176 cache_hash_file = try self.files.addOne();
176177 cache_hash_file.path = null;
177178 cache_hash_file.max_file_size = null;
179 cache_hash_file.contents = null;
178180 }
179181
180182 var iter = mem.tokenize(line, " ");
......@@ -301,6 +303,8 @@ pub const CacheHash = struct {
301303
302304 var cache_hash_file = try self.files.addOne();
303305 cache_hash_file.path = try fs.path.resolve(self.alloc, &[_][]const u8{file_path});
306 cache_hash_file.max_file_size = max_file_size_opt;
307 cache_hash_file.contents = null;
304308
305309 const contents = try self.populate_file_hash_fetch(otherAlloc, cache_hash_file);
306310