Replace vim_strncpy calls: fold.c

This commit is contained in:
Douglas Schneider
2014-05-26 19:54:00 -06:00
committed by Justin M. Keyes
parent a501d7a940
commit 4517eb80be

View File

@@ -1599,7 +1599,7 @@ static void foldAddMarker(linenr_T lnum, char_u *marker, int markerlen)
newline = xmalloc(line_len + markerlen + STRLEN(cms) + 1); newline = xmalloc(line_len + markerlen + STRLEN(cms) + 1);
STRCPY(newline, line); STRCPY(newline, line);
if (p == NULL) if (p == NULL)
vim_strncpy(newline + line_len, marker, markerlen); STRLCPY(newline + line_len, marker, markerlen + 1);
else { else {
STRCPY(newline + line_len, cms); STRCPY(newline + line_len, cms);
STRNCPY(newline + line_len + (p - cms), marker, markerlen); STRNCPY(newline + line_len + (p - cms), marker, markerlen);