mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
std: Fix oob slicing operator
This commit is contained in:
parent
855edd2949
commit
aa5865b9be
@ -1522,7 +1522,7 @@ pub fn openSelfExe() OpenSelfExeError!File {
|
||||
var buf: [MAX_PATH_BYTES]u8 = undefined;
|
||||
const self_exe_path = try selfExePath(&buf);
|
||||
buf[self_exe_path.len] = 0;
|
||||
return openFileAbsoluteZ(self_exe_path[0..self_exe_path.len :0].ptr, .{});
|
||||
return openFileAbsoluteZ(buf[0..self_exe_path.len :0].ptr, .{});
|
||||
}
|
||||
|
||||
test "openSelfExe" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user