Fix logic bug in ONLCR processing.

This commit is contained in:
px4dev 2012-11-02 00:10:10 -07:00
parent 5e1416178a
commit 9b509310e6
1 changed files with 1 additions and 1 deletions

View File

@ -328,7 +328,7 @@ static ssize_t uart_write(FAR struct file *filep, FAR const char *buffer, size_t
/* If the ONLCR flag is set, we should translate \n to \r\n */
ret = OK;
if ((ch == '\n') && (dev->termios_s.c_oflag && ONLCR))
if ((ch == '\n') && (dev->termios_s.c_oflag & ONLCR))
{
ret = uart_putxmitchar(dev, '\r');
}