diff options
Diffstat (limited to 'svr-chansession.c')
-rw-r--r-- | svr-chansession.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/svr-chansession.c b/svr-chansession.c index fff9dbc..d090395 100644 --- a/svr-chansession.c +++ b/svr-chansession.c @@ -693,7 +693,11 @@ static int sessioncommand(struct Channel *channel, struct ChanSess *chansess, /* take global command into account */ if (svr_opts.forced_command) { - chansess->original_command = chansess->cmd ? : m_strdup(""); + if (chansess->cmd) { + chansess->original_command = chansess->cmd; + } else { + chansess->original_command = m_strdup(""); + } chansess->cmd = m_strdup(svr_opts.forced_command); } else { /* take public key option 'command' into account */ |