summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r--usr.bin/tmux/cmd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c
index 4d77dc3aca9..63e262699b1 100644
--- a/usr.bin/tmux/cmd.c
+++ b/usr.bin/tmux/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.90 2014/01/09 14:20:55 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.91 2014/03/31 21:32:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -139,6 +139,9 @@ cmd_pack_argv(int argc, char **argv, char *buf, size_t len)
size_t arglen;
int i;
+ if (argc == 0)
+ return (0);
+
*buf = '\0';
for (i = 0; i < argc; i++) {
if (strlcpy(buf, argv[i], len) >= len)