diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-09-07 18:50:46 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-09-07 18:50:46 +0000 |
commit | a69d6b71f69b12c01a1ed0990c5f18cdb5b27483 (patch) | |
tree | e585fa2a6bbb8d7070e05e0feca593e98fd10564 /usr.bin/tmux/cmd-list-buffers.c | |
parent | 71bc7869f46d0ba653db9646b6ac592389a99d15 (diff) |
Give each paste buffer a size member instead of requiring them to be
zero-terminated.
Diffstat (limited to 'usr.bin/tmux/cmd-list-buffers.c')
-rw-r--r-- | usr.bin/tmux/cmd-list-buffers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-list-buffers.c b/usr.bin/tmux/cmd-list-buffers.c index 6a7194868c4..15c53ebf366 100644 --- a/usr.bin/tmux/cmd-list-buffers.c +++ b/usr.bin/tmux/cmd-list-buffers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-buffers.c,v 1.4 2009/08/18 12:26:37 nicm Exp $ */ +/* $OpenBSD: cmd-list-buffers.c,v 1.5 2009/09/07 18:50:45 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -55,7 +55,7 @@ cmd_list_buffers_exec(struct cmd *self, struct cmd_ctx *ctx) idx = 0; while ((pb = paste_walk_stack(&s->buffers, &idx)) != NULL) { - size = strlen(pb->data); + size = pb->size; /* Translate the first 50 characters. */ len = size; |