Ensure bytes_read is updated when errors occur during Windows serial i/o

pull/1336/head
Mike Black W9MDB 2023-07-11 11:02:03 -05:00
rodzic 84048e3e94
commit 79657a4b4d
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -555,10 +555,12 @@ static int port_read_sync_data(hamlib_port_t *p, void *buf, size_t count)
{
case ERROR_SUCCESS:
// No error?
bytes_read = 0;
break;
case ERROR_IO_PENDING:
// Shouldn't happen?
bytes_read = 0;
return -RIG_ETIMEOUT;
default: