shell: Fix prompt length not updated in shell_prompt_change
Prompt length is used when printing log messages to erase prompt. If length is not updated and new prompt is longer than default one then only part of the prompt is erased which looks like data corruption. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
ee3403af3e
commit
3a879deecc
1 changed files with 1 additions and 0 deletions
|
@ -1359,6 +1359,7 @@ int shell_prompt_change(const struct shell *shell, const char *prompt)
|
|||
return -EINVAL;
|
||||
}
|
||||
shell->ctx->prompt = prompt;
|
||||
shell->ctx->vt100_ctx.cons.name_len = shell_strlen(prompt);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue