Browse Source

Bugfix: lowl-vcom: _get_osfhandle failure returns INVALID_HANDLE_VALUE, not NULL

Luke Dashjr 12 years ago
parent
commit
bea5c42a4e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fpgautils.c

+ 1 - 1
fpgautils.c

@@ -1382,7 +1382,7 @@ int get_serial_cts(const int fd)
 	if (!fd)
 		return -1;
 	const HANDLE fh = (HANDLE)_get_osfhandle(fd);
-	if (!fh)
+	if (fh == INVALID_HANDLE_VALUE)
 		return -1;
 
 	DWORD flags;