Skip to content

Commit

Permalink
fix: Windows configure pass handles
Browse files Browse the repository at this point in the history
  • Loading branch information
mochalins committed Sep 15, 2024
1 parent 58a808a commit 49bcffb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/windows.zig
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub const Port = struct {
var dcb: DCB = std.mem.zeroes(DCB);
dcb.DCBlength = @sizeOf(DCB);

if (GetCommState(self.file.?, &dcb) == 0)
if (GetCommState(self.file.?.handle, &dcb) == 0)
return windows.unexpectedError(windows.GetLastError());

dcb.BaudRate = config.baud_rate;
Expand All @@ -98,7 +98,7 @@ pub const Port = struct {
dcb.XonChar = 0x11;
dcb.XoffChar = 0x13;

if (SetCommState(self.file.?, &dcb) == 0) {
if (SetCommState(self.file.?.handle, &dcb) == 0) {
return windows.unexpectedError(windows.GetLastError());
}
}
Expand Down

0 comments on commit 49bcffb

Please sign in to comment.