From 7200825da1238942605e50e127b79f0ab29b5904 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 2 Mar 2018 19:41:42 -0800 Subject: [PATCH] SERIAL: Make sure to properly initialize break status on serial reads --- sim_serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sim_serial.c b/sim_serial.c index 5b76713c..b370b208 100644 --- a/sim_serial.c +++ b/sim_serial.c @@ -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 ());