fix regressions on Windows from previous commit
parent
9c13e9b7ed
commit
01fb421031
|
@ -143,8 +143,9 @@ pub const DirectAllocator = struct {
|
|||
return result;
|
||||
},
|
||||
Os.windows => {
|
||||
const self = @fieldParentPtr(DirectAllocator, "allocator", allocator);
|
||||
if (old_mem.len == 0) return alloc(allocator, new_size, new_align);
|
||||
|
||||
const self = @fieldParentPtr(DirectAllocator, "allocator", allocator);
|
||||
const old_adjusted_addr = @ptrToInt(old_mem.ptr);
|
||||
const old_record_addr = old_adjusted_addr + old_mem.len;
|
||||
const root_addr = @intToPtr(*align(1) usize, old_record_addr).*;
|
||||
|
|
|
@ -197,7 +197,7 @@ pub fn createWindowsEnvBlock(allocator: *mem.Allocator, env_map: *const BufMap)
|
|||
i += 1;
|
||||
result[i] = 0;
|
||||
i += 1;
|
||||
return allocator.shrink(u16, result, i);
|
||||
return allocator.shrink(result, i);
|
||||
}
|
||||
|
||||
pub fn windowsFindFirstFile(
|
||||
|
|
Loading…
Reference in New Issue