0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.3.017

Problem:    smatch reports errors.
Solution:   Fix the reported errors. (Dominique Pelle)
This commit is contained in:
Bram Moolenaar
2010-09-29 18:32:52 +02:00
parent 173c98550f
commit a8fc79895e
3 changed files with 10 additions and 6 deletions

View File

@@ -7600,10 +7600,10 @@ do_highlight(line, forceit, init)
/*
* Copy characters from arg[] to buf[], translating <> codes.
*/
for (p = arg, off = 0; off < 100 && *p; )
for (p = arg, off = 0; off < 100 - 6 && *p; )
{
len = trans_special(&p, buf + off, FALSE);
if (len) /* recognized special char */
if (len > 0) /* recognized special char */
off += len;
else /* copy as normal char */
buf[off++] = *p++;