fix: update win32 tui build for zig-0.15

This commit is contained in:
CJ van den Berg 2025-10-01 16:59:55 +02:00
parent 1d61f18f9a
commit 6da6af22c8
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 8 additions and 8 deletions

View file

@ -40,10 +40,10 @@ fn find_binary_in_path_windows(allocator: std.mem.Allocator, binary_name_: []con
defer dir.close();
var bin_extensions_iterator = std.mem.splitScalar(u8, bin_extensions, ';');
while (bin_extensions_iterator.next()) |bin_extension| {
var path = std.ArrayList(u8).init(allocator);
try path.appendSlice(binary_name_);
try path.appendSlice(bin_extension);
const binary_name = try path.toOwnedSlice();
var path: std.ArrayList(u8) = .empty;
try path.appendSlice(allocator, binary_name_);
try path.appendSlice(allocator, bin_extension);
const binary_name = try path.toOwnedSlice(allocator);
defer allocator.free(binary_name);
_ = dir.statFile(binary_name) catch continue;
const resolved_binary_path = try std.fs.path.join(allocator, &[_][]const u8{ bin_path, binary_name });