diff options
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 2decb11d25..eba3e98357 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -2476,7 +2476,7 @@ int op_change(oparg_T *oap) // Subsequent calls to ml_get() flush the firstline data - take a // copy of the inserted text. char *ins_text = xmalloc((size_t)ins_len + 1); - xstrlcpy(ins_text, firstline + bd.textcol, (size_t)ins_len + 1); + xmemcpyz(ins_text, firstline + bd.textcol, (size_t)ins_len); for (linenr_T linenr = oap->start.lnum + 1; linenr <= oap->end.lnum; linenr++) { block_prep(oap, &bd, linenr, true); |