From ccba613e5b277e70e8261c04ecc37ff3ef14a217 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 7 Sep 2009 18:50:45 +0000 Subject: Give each paste buffer a size member instead of requiring them to be zero-terminated. --- cmd-show-buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cmd-show-buffer.c') diff --git a/cmd-show-buffer.c b/cmd-show-buffer.c index 8972f098..151fc2ae 100644 --- a/cmd-show-buffer.c +++ b/cmd-show-buffer.c @@ -18,7 +18,6 @@ #include -#include #include #include "tmux.h" @@ -65,7 +64,7 @@ cmd_show_buffer_exec(struct cmd *self, struct cmd_ctx *ctx) if (pb == NULL) return (0); - size = strlen(pb->data); + size = pb->size; if (size > SIZE_MAX / 4 - 1) size = SIZE_MAX / 4 - 1; in = xmalloc(size * 4 + 1); -- cgit