aboutsummaryrefslogtreecommitdiff
path: root/cmd-command-prompt.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-07-25 17:20:40 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-07-25 17:20:40 +0000
commitba597da72e8a548403f2a86cbe864f6f8c087397 (patch)
tree2c40dc91a642bc993036bc4c6b2a0b062763f980 /cmd-command-prompt.c
parent546838ee6567d5fde03571286199068d5ec9b608 (diff)
downloadrtmux-ba597da72e8a548403f2a86cbe864f6f8c087397.tar.gz
rtmux-ba597da72e8a548403f2a86cbe864f6f8c087397.tar.bz2
rtmux-ba597da72e8a548403f2a86cbe864f6f8c087397.zip
Environment variables in configuration file.
Diffstat (limited to 'cmd-command-prompt.c')
-rw-r--r--cmd-command-prompt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c
index c156002a..d0bc5d9e 100644
--- a/cmd-command-prompt.c
+++ b/cmd-command-prompt.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-command-prompt.c,v 1.4 2008-06-25 20:43:13 nicm Exp $ */
+/* $Id: cmd-command-prompt.c,v 1.5 2008-07-25 17:20:40 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -72,7 +72,7 @@ cmd_command_prompt_callback(void *data, char *s)
if (s == NULL)
return;
- if ((cmd = cmd_string_parse(s, &cause)) == NULL) {
+ if (cmd_string_parse(s, &cmd, &cause) != 0) {
if (cause == NULL)
return;
*cause = toupper((u_char) *cause);
@@ -80,6 +80,8 @@ cmd_command_prompt_callback(void *data, char *s)
xfree(cause);
return;
}
+ if (cmd == NULL)
+ return;
ctx.msgdata = NULL;
ctx.cursession = c->session;