aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2013-05-31 13:00:11 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2013-05-31 13:00:11 +0100
commit2ee9c4df12429d4f6fb8f06a373fdd5c0347049c (patch)
tree1c241b4bcd2e637cbae11d7fb6b34840d9839ec7 /cmd.c
parente6c77e7afbcee07ed6237f2a0f30e70f45ecf0ba (diff)
parent76cb088d16fd5aa47b54428368ef403cbbcf4f5a (diff)
downloadrtmux-2ee9c4df12429d4f6fb8f06a373fdd5c0347049c.tar.gz
rtmux-2ee9c4df12429d4f6fb8f06a373fdd5c0347049c.tar.bz2
rtmux-2ee9c4df12429d4f6fb8f06a373fdd5c0347049c.zip
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index eecac462..282fb112 100644
--- a/cmd.c
+++ b/cmd.c
@@ -294,8 +294,8 @@ cmd_print(struct cmd *cmd, char *buf, size_t len)
size_t off, used;
off = xsnprintf(buf, len, "%s ", cmd->entry->name);
- if (off < len) {
- used = args_print(cmd->args, buf + off, len - off);
+ if (off + 1 < len) {
+ used = args_print(cmd->args, buf + off, len - off - 1);
if (used == 0)
off--;
else