changeset 21449:78734d1f6639 v8.2.1275

patch 8.2.1275: Vim9: compiler warning for buffer size Commit: https://github.com/vim/vim/commit/5a67c37a554daa7627bdf0c8e7ddd5f1b597f978 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 23 14:39:47 2020 +0200 patch 8.2.1275: Vim9: compiler warning for buffer size Problem: Vim9: compiler warning for buffer size. Solution: Change the offset from 10 to 15. (Dominique Pell?, closes https://github.com/vim/vim/issues/6518)
author Bram Moolenaar <Bram@vim.org>
date Thu, 23 Jul 2020 14:45:04 +0200
parents ce67668c796f
children d6c578125b04
files src/version.c src/vim9script.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1275,
+/**/
     1274,
 /**/
     1273,
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -198,11 +198,11 @@ find_exported(
 	char_u	*funcname;
 
 	// it could be a user function.
-	if (STRLEN(name) < sizeof(buffer) - 10)
+	if (STRLEN(name) < sizeof(buffer) - 15)
 	    funcname = buffer;
 	else
 	{
-	    funcname = alloc(STRLEN(name) + 10);
+	    funcname = alloc(STRLEN(name) + 15);
 	    if (funcname == NULL)
 		return -1;
 	}