From adceb3e2a4a6535fa742a356f810bf1f445fe672 Mon Sep 17 00:00:00 2001 From: z14git Date: Wed, 14 Oct 2020 09:27:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E4=BF=9Dchar=20line[]=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E4=BD=8D=E4=B8=BA'\0'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/finsh/shell.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/finsh/shell.h b/components/finsh/shell.h index 8741759ed4..8f94e23e8b 100644 --- a/components/finsh/shell.h +++ b/components/finsh/shell.h @@ -78,7 +78,7 @@ struct finsh_shell struct finsh_parser parser; #endif - char line[FINSH_CMD_SIZE]; + char line[FINSH_CMD_SIZE + 1]; rt_uint16_t line_position; rt_uint16_t line_curpos; @@ -107,4 +107,3 @@ const char *finsh_get_password(void); #endif #endif -