diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-07-18 21:40:44 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-07-18 21:40:44 +0000 |
commit | b635633989f0ff5a5dbb564d65d332741f0e3e8d (patch) | |
tree | c7c744c865d0004b0ed58a2f573d8cbbce7ab7b8 /src/getchar.c | |
parent | e759a7aa9a514626cd0373d1bd4e92777b1730c5 (diff) | |
download | vim-git-b635633989f0ff5a5dbb564d65d332741f0e3e8d.tar.gz |
updated for version 7.0109
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/getchar.c b/src/getchar.c index 311fe584d..bc30d6c99 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -257,8 +257,7 @@ add_buff(buf, s, slen) if (buf->bh_space >= (int)slen) { len = (long_u)STRLEN(buf->bh_curr->b_str); - STRNCPY(buf->bh_curr->b_str + len, s, slen); - buf->bh_curr->b_str[len + slen] = NUL; + vim_strncpy(buf->bh_curr->b_str + len, s, (size_t)slen); buf->bh_space -= slen; } else @@ -272,8 +271,7 @@ add_buff(buf, s, slen) if (p == NULL) return; /* no space, just forget it */ buf->bh_space = len - slen; - STRNCPY(p->b_str, s, slen); - p->b_str[slen] = NUL; + vim_strncpy(p->b_str, s, (size_t)slen); p->b_next = buf->bh_curr->b_next; buf->bh_curr->b_next = p; |