diff options
| -rw-r--r-- | std/os/windows/util.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/std/os/windows/util.zig b/std/os/windows/util.zig index a489cca163..2a1a82a963 100644 --- a/std/os/windows/util.zig +++ b/std/os/windows/util.zig @@ -52,7 +52,8 @@ pub const WriteError = error{ }; pub fn windowsWrite(handle: windows.HANDLE, bytes: []const u8) WriteError!void { - if (windows.WriteFile(handle, bytes.ptr, @intCast(u32, bytes.len), null, null) == 0) { + var bytes_written: windows.DWORD = undefined; + if (windows.WriteFile(handle, bytes.ptr, @intCast(u32, bytes.len), &bytes_written, null) == 0) { const err = windows.GetLastError(); return switch (err) { windows.ERROR.INVALID_USER_BUFFER => WriteError.SystemResources, |
