]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-330 v7.1.330
authorBram Moolenaar <Bram@vim.org>
Sat, 21 Jun 2008 14:30:28 +0000 (14:30 +0000)
committerBram Moolenaar <Bram@vim.org>
Sat, 21 Jun 2008 14:30:28 +0000 (14:30 +0000)
src/misc1.c
src/version.c

index f621a8949c4958b520c60a87ca5fef10fed09b51..1992cf99740e4090cf9a0bb409b688596c934519 100644 (file)
@@ -1880,15 +1880,20 @@ ins_bytes_len(p, len)
 # ifdef FEAT_MBYTE
     int                n;
 
-    for (i = 0; i < len; i += n)
-    {
-       n = (*mb_ptr2len)(p + i);
-       ins_char_bytes(p + i, n);
-    }
-# else
-    for (i = 0; i < len; ++i)
-       ins_char(p[i]);
+    if (has_mbyte)
+       for (i = 0; i < len; i += n)
+       {
+           if (enc_utf8)
+               /* avoid reading past p[len] */
+               n = utfc_ptr2len_len(p + i, len - i);
+           else
+               n = (*mb_ptr2len)(p + i);
+           ins_char_bytes(p + i, n);
+       }
+    else
 # endif
+       for (i = 0; i < len; ++i)
+           ins_char(p[i]);
 }
 #endif
 
index f9b88868e0e7e4ea3cc7e1204cf2cb7b585ae5ec..5d1958485e6cd5b3b07341dba222259cd59a667a 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    330,
 /**/
     329,
 /**/