From 3115d2f2cdc13f714740ccf024e1baedfc31c93d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Sat, 24 Oct 2020 07:09:53 +0000 Subject: [PATCH] readd original code from #6638. realpathZ() is expected to take a [*:0]const u8 --- lib/std/fs.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/fs.zig b/lib/std/fs.zig index b4da2e0a5c..327faac0f5 100644 --- a/lib/std/fs.zig +++ b/lib/std/fs.zig @@ -2251,7 +2251,7 @@ pub fn selfExePath(out_buffer: []u8) SelfExePathError![]u8 { const PATH = std.os.getenvZ("PATH") orelse return error.FileNotFound; var path_it = mem.tokenize(PATH, &[_]u8{path.delimiter}); while (path_it.next()) |a_path| { - var resolved_path_buf: [MAX_PATH_BYTES]u8 = undefined; + var resolved_path_buf: [MAX_PATH_BYTES-1:0]u8 = undefined; const resolved_path = std.fmt.bufPrintZ(&resolved_path_buf, "{s}/{s}", .{ a_path, os.argv[0],