From 584d06bd2733f926f64ece56fc76cff4bfbc0ad5 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Wed, 29 Jun 2022 23:18:14 -0400 Subject: [PATCH] =?UTF-8?q?[finsh]=E4=BF=AE=E5=A4=8D=E4=BD=BF=E7=94=A8fins?= =?UTF-8?q?h=5Fset=5Fprompt=E9=87=8D=E5=AE=9A=E5=90=91=E4=BA=86msh?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E7=AC=A6=E7=9A=84=E5=90=8D=E7=A7=B0=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E8=B7=AF=E5=BE=84=E5=8A=9F=E8=83=BD=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/finsh/shell.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/finsh/shell.c b/components/finsh/shell.c index c06b688ed3..fecb4f4af3 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -101,9 +101,11 @@ const char *finsh_get_prompt(void) if (finsh_prompt_custom) { strncpy(finsh_prompt, finsh_prompt_custom, sizeof(finsh_prompt) - 1); - return finsh_prompt; } - strcpy(finsh_prompt, _MSH_PROMPT); + else + { + strcpy(finsh_prompt, _MSH_PROMPT); + } #if defined(DFS_USING_POSIX) && defined(DFS_USING_WORKDIR) /* get current working directory */ -- GitLab