4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-19 16:53:29 +08:00

[component][at] fix(misc): fix null char input issue

fix issue #7005
This commit is contained in:
wenxingpt 2023-05-14 12:33:59 +08:00 committed by GitHub
parent 9a77eedd89
commit f2d78e87b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,7 @@
#define AT_CMD_SEMICOLON ';'
#define AT_CMD_CR '\r'
#define AT_CMD_LF '\n'
#define AT_CMD_NULL '\0'
static at_server_t at_server_local = RT_NULL;
static at_cmd_t cmd_table = RT_NULL;
@ -474,6 +475,10 @@ static void server_parser(at_server_t server)
continue;
}
else if (ch == AT_CMD_NULL)
{
continue;
}
else
{
at_server_printf("%c", ch);