Fix allocation error
This commit is contained in:
parent
0d17afe989
commit
f55feb0de5
@ -109,7 +109,7 @@ pub fn main() !void {
|
|||||||
});
|
});
|
||||||
if (std.mem.eql(u8, entry.name[(entry.name.len - 4)..(entry.name.len)], ".org")) {
|
if (std.mem.eql(u8, entry.name[(entry.name.len - 4)..(entry.name.len)], ".org")) {
|
||||||
std.debug.print("Added\n", .{});
|
std.debug.print("Added\n", .{});
|
||||||
try file_paths.append(entry_path[0..(entry_path.len - 1)]);
|
try file_paths.append(entry_path[0..(entry_path.len)]);
|
||||||
} else {
|
} else {
|
||||||
allocator.free(entry_path);
|
allocator.free(entry_path);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user