fix build-bug introduced by mrpeach's multibyte read

svn path=/trunk/externals/iem/comport/; revision=13121
This commit is contained in:
IOhannes m zmölnig 2010-01-31 14:10:12 +00:00
parent 6fa08ba7a3
commit 7e89880e44

View file

@ -1138,10 +1138,10 @@ static void comport_tick(t_comport *x)
{ {
ioctl(fd, FIONREAD, &count); /* load count with the number of bytes in the receive buffer */ ioctl(fd, FIONREAD, &count); /* load count with the number of bytes in the receive buffer */
/*err = read(fd,(char *) &serial_byte,1);*/ /*err = read(fd,(char *) &serial_byte,1);*/
err = read(fd,(char *) &serial_byte, count);/* try to read count bytes */ err = read(fd,(char *) serial_byte, count);/* try to read count bytes */
if (err >= 0) if (err >= 0)
{ {
for (i = 0; i < err; ++i ) outlet_float(x->x_data_outlet, (t_float) serial_byte); for (i = 0; i < err; ++i ) outlet_float(x->x_data_outlet, (t_float) serial_byte[i]);
} }
else whicherr = errno; else whicherr = errno;
} }