mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 14:55:25 +00:00
readd original code from #6638. realpathZ() is expected to take a [*:0]const u8
This commit is contained in:
parent
872bc787b5
commit
3115d2f2cd
@ -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],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user