From 86eb0b82ab1376f6cad6e35d2ddecee4ed1438b9 Mon Sep 17 00:00:00 2001 From: hqm <13720409820@163.com> Date: Sat, 18 Sep 2021 21:15:18 +0800 Subject: [PATCH] Fix some bugs --- src/xcmd.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/xcmd.c b/src/xcmd.c index 3d49970..aee3663 100755 --- a/src/xcmd.c +++ b/src/xcmd.c @@ -303,15 +303,11 @@ char* xcmd_display_get(void) void xcmd_display_clear(void) { char *line = xcmd_display_get(); - uint16_t len = strlen(line); - if(len) - { - xcmd_print(DL(0)); - xcmd_print("\r%s", g_xcmder.parser.prompt); - g_xcmder.parser.byte_num = 0; - g_xcmder.parser.cursor = 0; - line[0] = '\0'; - } + xcmd_print(DL(0)); + xcmd_print("\r%s", g_xcmder.parser.prompt); + g_xcmder.parser.byte_num = 0; + g_xcmder.parser.cursor = 0; + line[0] = '\0'; } void xcmd_display_insert_char(char c)