summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/paste.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/paste.c')
-rw-r--r--usr.bin/tmux/paste.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/paste.c b/usr.bin/tmux/paste.c
index 2f091406e4c..a76b47eea52 100644
--- a/usr.bin/tmux/paste.c
+++ b/usr.bin/tmux/paste.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: paste.c,v 1.1 2009/06/01 22:58:49 nicm Exp $ */
+/* $OpenBSD: paste.c,v 1.2 2009/07/02 16:15:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -101,6 +101,9 @@ paste_add(struct paste_stack *ps, char *data, u_int limit)
{
struct paste_buffer *pb;
+ if (*data == '\0')
+ return;
+
while (ARRAY_LENGTH(ps) >= limit)
ARRAY_TRUNC(ps, 1);