aboutsummaryrefslogtreecommitdiff
path: root/cmd-command-prompt.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-command-prompt.c')
-rw-r--r--cmd-command-prompt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c
index dec40bf2..3cc5b2fb 100644
--- a/cmd-command-prompt.c
+++ b/cmd-command-prompt.c
@@ -175,7 +175,8 @@ cmd_command_prompt_callback(void *data, const char *s, int done)
return (1);
}
- if (cmd_string_parse(new_template, &cmdlist, NULL, 0, &cause) != 0) {
+ cmdlist = cmd_string_parse(new_template, NULL, 0, &cause);
+ if (cmdlist == NULL) {
if (cause != NULL) {
new_item = cmdq_get_callback(cmd_command_prompt_error,
cause);