diff --git a/serialport.c b/serialport.c index f7e946b..0ebf326 100644 --- a/serialport.c +++ b/serialport.c @@ -539,6 +539,8 @@ int sp_set_params(struct sp_port *port, int baudrate, return SP_ERR_ARG; } + dcb.ByteSize = bits; + switch (stopbits) { /* Note: There's also ONE5STOPBITS == 1.5 (unneeded so far). */ case 1: