diff options
| author | wenxingpt <[email protected]> | 2023-05-14 12:33:59 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-14 00:33:59 -0400 |
| commit | f2d78e87b5130c75162f1ba43471306807960a1b (patch) | |
| tree | b7c749299b3e60898bee986751dcd1735a660805 /components/net | |
| parent | 9a77eedd8968e07bdab65493529a9dd120bb9370 (diff) | |
[component][at] fix(misc): fix null char input issue
fix issue #7005
Diffstat (limited to 'components/net')
| -rw-r--r-- | components/net/at/src/at_server.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/net/at/src/at_server.c b/components/net/at/src/at_server.c index f55891de11..c9f98ad39d 100644 --- a/components/net/at/src/at_server.c +++ b/components/net/at/src/at_server.c @@ -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); |
