diff src/buffer.c @ 5407:7b760cda2bbf v7.4.054

updated for version 7.4.054 Problem: Reading past end of the 'stl' string. Solution: Don't increment pointer when already at the NUL. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Sat, 02 Nov 2013 04:39:38 +0100
parents f6247eaf4e1d
children 878ed73c7070
line wrap: on
line diff
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4062,7 +4062,8 @@ build_stl_str_hl(wp, out, outlen, fmt, u
 		item[curitem].minwid = -syn_namen2id(t, (int)(s - t));
 		curitem++;
 	    }
-	    ++s;
+	    if (*s != NUL)
+		++s;
 	    continue;
 	}