diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-09-07 18:50:45 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-09-07 18:50:45 +0000 |
commit | ccba613e5b277e70e8261c04ecc37ff3ef14a217 (patch) | |
tree | 26ed2fcf88ae87e4e76e922df255e4fd62589e31 /cmd-show-buffer.c | |
parent | e97006b102dd274dd8cc70c2aee13f6b09f69a41 (diff) | |
download | rtmux-ccba613e5b277e70e8261c04ecc37ff3ef14a217.tar.gz rtmux-ccba613e5b277e70e8261c04ecc37ff3ef14a217.tar.bz2 rtmux-ccba613e5b277e70e8261c04ecc37ff3ef14a217.zip |
Give each paste buffer a size member instead of requiring them to be
zero-terminated.
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); |