diff --git a/components/finsh/shell.h b/components/finsh/shell.h index 8741759ed47523870d2e8dcc5649cd931f8462ed..8f94e23e8b572ae33ce47ad093e873272271c979 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 -