Skip to content

Commit

Permalink
Remove use of std.cstr.addNullByte
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGoertz committed Jul 10, 2023
1 parent 925b88f commit 1535de1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Package.zig
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ const FetchLocation = union(SourceType) {
var uri_str = std.ArrayList(u8).init(gpa);
defer uri_str.deinit();
try uri.format("+/", .{}, uri_str.writer());
const uri_str_z = try std.cstr.addNullByte(gpa, uri_str.items);
const uri_str_z = try gpa.dupeZ(u8, uri_str.items);
defer gpa.free(uri_str_z);

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

0 comments on commit 1535de1

Please sign in to comment.