mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
std.fs.File.writevAll: fix behavior for 0-length vectors
The OS layer expects pointer addresses to be inside the application's address space even if the length is zero. Meanwhile, in Zig, slices may have undefined pointer addresses when the length is zero. So this function now modifies the iov_base fields when the length is zero. This is a companion commit to b4893eb05565b2cb033c6ed88617d73faf878455.
This commit is contained in:
parent
b1299d5153
commit
e098b287e1
2 changed files with 20 additions and 4 deletions
Loading…
Add table
Add a link
Reference in a new issue