driver/serial: fix error echo about VT100 escape sequence

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu1 2023-08-29 17:17:07 +08:00 committed by Xiang Xiao
parent 1956385a7d
commit ec4f6ecce2
1 changed files with 2 additions and 2 deletions

View File

@ -885,11 +885,11 @@ static ssize_t uart_read(FAR struct file *filep,
dev->escape = 0;
}
else if (dev->escape > 0)
else if (dev->escape > 0)
{
/* Skipping character count down */
if (--dev->escape > 0)
if (dev->escape-- > 0)
{
continue;
}