From 1535de102b3e6b696ac47f3dc33ca508649f6e7f Mon Sep 17 00:00:00 2001 From: Adam Goertz Date: Sun, 9 Jul 2023 22:13:15 +0000 Subject: [PATCH] Remove use of std.cstr.addNullByte --- src/Package.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Package.zig b/src/Package.zig index c1428c199479..fef89153eea4 100644 --- a/src/Package.zig +++ b/src/Package.zig @@ -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;