SERIAL: Make sure to properly initialize break status on serial reads

This commit is contained in:
Mark Pizzolato 2018-03-02 19:41:42 -08:00
parent ba962252b0
commit 7200825da1

View file

@ -845,6 +845,7 @@ DWORD commerrors;
COMSTAT cs;
char *bptr;
memset (brk, 0, count); /* start with no break indicators */
if (!ClearCommError (port->hPort, &commerrors, &cs)) { /* get the comm error flags */
sim_error_serial ("ClearCommError", /* function failed; report unexpected error */
(int) GetLastError ());