Skip to content

Commit

Permalink
update win32exelink for deprecated std alias
Browse files Browse the repository at this point in the history
This file was missed in the previous update (e37d205).
  • Loading branch information
dweiller committed Jul 23, 2024
1 parent e37d205 commit a2dc558
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions win32exelink.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const exe_marker_len = 42;

// I'm exporting this and making it mutable to make sure the compiler keeps it around
// and prevent it from evaluting its contents at comptime
export var zig_exe_string: [exe_marker_len + std.fs.MAX_PATH_BYTES + 1]u8 =
("!!!THIS MARKS THE zig_exe_string MEMORY!!#" ++ ([1]u8{0} ** (std.fs.MAX_PATH_BYTES + 1))).*;
export var zig_exe_string: [exe_marker_len + std.fs.max_path_bytes + 1]u8 =
("!!!THIS MARKS THE zig_exe_string MEMORY!!#" ++ ([1]u8{0} ** (std.fs.max_path_bytes + 1))).*;

const global = struct {
var child: std.process.Child = undefined;
Expand All @@ -28,8 +28,8 @@ pub fn main() !u8 {
var zig_exe_len: usize = 1;
while (zig_exe_string[exe_marker_len + zig_exe_len] != 0) {
zig_exe_len += 1;
if (exe_marker_len + zig_exe_len > std.fs.MAX_PATH_BYTES) {
log.err("the zig target execuable is either too big (over {}) or the exe is corrupt", .{std.fs.MAX_PATH_BYTES});
if (exe_marker_len + zig_exe_len > std.fs.max_path_bytes) {
log.err("the zig target execuable is either too big (over {}) or the exe is corrupt", .{std.fs.max_path_bytes});
return 1;
}
}
Expand Down

0 comments on commit a2dc558

Please sign in to comment.