Replace vim_strncpy calls: ops.c

This commit is contained in:
Douglas Schneider 2014-05-26 07:53:04 -06:00 committed by Justin M. Keyes
parent a328bcfb47
commit 4a8ac58596

View File

@ -2222,7 +2222,7 @@ int op_change(oparg_T *oap)
/* Subsequent calls to ml_get() flush the firstline data - take a /* Subsequent calls to ml_get() flush the firstline data - take a
* copy of the inserted text. */ * copy of the inserted text. */
ins_text = (char_u *) xmalloc((size_t)(ins_len + 1)); ins_text = (char_u *) xmalloc((size_t)(ins_len + 1));
vim_strncpy(ins_text, firstline + bd.textcol, (size_t)ins_len); STRLCPY(ins_text, firstline + bd.textcol, ins_len + 1);
for (linenr = oap->start.lnum + 1; linenr <= oap->end.lnum; for (linenr = oap->start.lnum + 1; linenr <= oap->end.lnum;
linenr++) { linenr++) {
block_prep(oap, &bd, linenr, TRUE); block_prep(oap, &bd, linenr, TRUE);