Skip to content

Commit 9417b92

Browse files
committed
Remove use of std.cstr.addNullByte
1 parent 925b88f commit 9417b92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Package.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ const FetchLocation = union(SourceType) {
428428
var uri_str = std.ArrayList(u8).init(gpa);
429429
defer uri_str.deinit();
430430
try uri.format("+/", .{}, uri_str.writer());
431-
const uri_str_z = try std.cstr.addNullByte(gpa, uri_str.items);
431+
const uri_str_z = try gpa.dupeZ(uri_str.items);
432432
defer gpa.free(uri_str_z);
433433

434434
var buf: [std.os.windows.MAX_PATH:0]u8 = undefined;

0 commit comments

Comments
 (0)