diff src/syntax.c @ 2593:103dea654543 v7.3.017

updated for version 7.3.017 Problem: smatch reports errors. Solution: Fix the reported errors. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Wed, 29 Sep 2010 18:32:52 +0200
parents 6768ebd0bc04
children 7b44c70ee8ab
line wrap: on
line diff
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -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++;