Replace vim_strncpy calls: eval.c

This commit is contained in:
Douglas Schneider
2014-06-04 20:02:57 -06:00
committed by Justin M. Keyes
parent 004b45d6f5
commit 1e1750fdce

View File

@@ -5875,7 +5875,7 @@ dictitem_T *dict_find(dict_T *d, char_u *key, int len)
tofree = akey = vim_strnsave(key, len); tofree = akey = vim_strnsave(key, len);
} else { } else {
/* Avoid a malloc/free by using buf[]. */ /* Avoid a malloc/free by using buf[]. */
vim_strncpy(buf, key, len); STRLCPY(buf, key, len + 1);
akey = buf; akey = buf;
} }