From ec4f6ecce23d0bd6dcf47cfa1d21667861fe5dda Mon Sep 17 00:00:00 2001 From: dongjiuzhu1 Date: Tue, 29 Aug 2023 17:17:07 +0800 Subject: [PATCH] driver/serial: fix error echo about VT100 escape sequence Signed-off-by: dongjiuzhu1 --- drivers/serial/serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 2c70f35210..b3ea7e6881 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -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; }