Skip to content

Commit 6f3afbe

Browse files
kimushureconbot
authored andcommitted
fix(windows): bad parameter for ReadThread (windows) (#1377)
1 parent 8f650c3 commit 6f3afbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/serialport_win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ NAN_METHOD(Read) {
425425
async->data = baton;
426426
// ReadFileEx requires a thread that can block. Create a new thread to
427427
// run the read operation, saving the handle so it can be deallocated later.
428-
baton->hThread = CreateThread(NULL, 0, ReadThread, baton, 0, NULL);
428+
baton->hThread = CreateThread(NULL, 0, ReadThread, async, 0, NULL);
429429
}
430430

431431
void __stdcall ReadIOCompletion(DWORD errorCode, DWORD bytesTransferred, OVERLAPPED* ov) {

0 commit comments

Comments
 (0)