recv can return -1
This commit is contained in:
parent
38ec72ece3
commit
01ba2ef2b0
@ -1388,7 +1388,7 @@ void bx_serial_c::rx_timer(void)
|
|||||||
#else
|
#else
|
||||||
read(socketid, &chbuf, 1);
|
read(socketid, &chbuf, 1);
|
||||||
#endif
|
#endif
|
||||||
if (bytes) {
|
if (bytes > 0) {
|
||||||
BX_INFO((" -- COM %d : read byte [%d]", port+1, chbuf));
|
BX_INFO((" -- COM %d : read byte [%d]", port+1, chbuf));
|
||||||
data_ready = 1;
|
data_ready = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user