mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-16 08:38:12 +02:00
Add xreallocarray and remove nmemb argument from xrealloc.
This commit is contained in:
@ -48,7 +48,7 @@ const struct cmd_entry cmd_capture_pane_entry = {
|
||||
char *
|
||||
cmd_capture_pane_append(char *buf, size_t *len, char *line, size_t linelen)
|
||||
{
|
||||
buf = xrealloc(buf, 1, *len + linelen + 1);
|
||||
buf = xrealloc(buf, *len + linelen + 1);
|
||||
memcpy(buf + *len, line, linelen);
|
||||
*len += linelen;
|
||||
return (buf);
|
||||
|
Reference in New Issue
Block a user