aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 1beabb6111..5a2589cc66 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -244,7 +244,7 @@ static void add_buff(buffheader_T *const buf, const char *const s, ptrdiff_t sle
size_t len;
if (buf->bh_space >= (size_t)slen) {
len = strlen(buf->bh_curr->b_str);
- STRLCPY(buf->bh_curr->b_str + len, s, slen + 1);
+ xstrlcpy(buf->bh_curr->b_str + len, s, (size_t)slen + 1);
buf->bh_space -= (size_t)slen;
} else {
if (slen < MINIMAL_SIZE) {
@@ -254,7 +254,7 @@ static void add_buff(buffheader_T *const buf, const char *const s, ptrdiff_t sle
}
buffblock_T *p = xmalloc(sizeof(buffblock_T) + len);
buf->bh_space = len - (size_t)slen;
- STRLCPY(p->b_str, s, slen + 1);
+ xstrlcpy(p->b_str, s, (size_t)slen + 1);
p->b_next = buf->bh_curr->b_next;
buf->bh_curr->b_next = p;