mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 21:56:57 +00:00
Give each paste buffer a size member instead of requiring them to be
zero-terminated.
This commit is contained in:
@ -75,7 +75,7 @@ cmd_save_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (fwrite(pb->data, 1, strlen(pb->data), f) != strlen(pb->data)) {
|
||||
if (fwrite(pb->data, 1, pb->size, f) != pb->size) {
|
||||
ctx->error(ctx, "%s: fwrite error", data->arg);
|
||||
fclose(f);
|
||||
return (-1);
|
||||
|
Reference in New Issue
Block a user