From 5a67c37a554daa7627bdf0c8e7ddd5f1b597f978 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 23 Jul 2020 14:39:47 +0200 Subject: [PATCH] patch 8.2.1275: Vim9: compiler warning for buffer size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Vim9: compiler warning for buffer size. Solution: Change the offset from 10 to 15. (Dominique Pellé, closes #6518) --- src/version.c | 2 ++ src/vim9script.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/version.c b/src/version.c index 82b5780b4..3489c45ba 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1275, /**/ 1274, /**/ diff --git a/src/vim9script.c b/src/vim9script.c index 24953cd60..34c3dabcf 100644 --- 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; }