console: shell: Fix not printing selected module prompt

If application prompt handler returns NULL curently selected module
prompt should also be checked before of printing default shell prompt.

Change-Id: Iba9c191041951c31036766b1cc8070b040655445
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This commit is contained in:
Szymon Janc 2016-11-02 20:57:18 +01:00 committed by Anas Nashif
parent c5a5397804
commit 6fc74083db

View file

@ -67,7 +67,9 @@ static const char *get_prompt(void)
if (str) {
return str;
}
} else if (default_module != -1) {
}
if (default_module != -1) {
return default_module_prompt;
}