diff options
Diffstat (limited to 'cmd-show-buffer.c')
-rw-r--r-- | cmd-show-buffer.c | 3 |
1 files changed, 1 insertions, 2 deletions
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 <sys/types.h> -#include <string.h> #include <vis.h> #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); |