summaryrefslogtreecommitdiff
path: root/components/finsh/shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/finsh/shell.c')
-rw-r--r--components/finsh/shell.c6
1 files 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 */