windows: fix module.paths getter causing a crash (#8633)

* windows: fix module.paths getter causing a crash

* use the buffer that was there before
This commit is contained in:
Meghan Denny
2024-02-02 01:29:50 -08:00
committed by GitHub
parent 647b15e4f3
commit 3a6318b67c
3 changed files with 9 additions and 12 deletions

View File

@@ -5273,7 +5273,7 @@ pub fn concatWithLength(
allocator: std.mem.Allocator,
args: []const string,
length: usize,
) !string {
) ![]u8 {
const out = try allocator.alloc(u8, length);
var remain = out;
for (args) |arg| {
@@ -5287,7 +5287,7 @@ pub fn concatWithLength(
pub fn concat(
allocator: std.mem.Allocator,
args: []const string,
) !string {
) ![]u8 {
var length: usize = 0;
for (args) |arg| {
length += arg.len;