From: Bram Moolenaar Date: Thu, 23 Jul 2020 12:39:47 +0000 (+0200) Subject: patch 8.2.1275: Vim9: compiler warning for buffer size X-Git-Tag: v8.2.1275 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a67c37a554daa7627bdf0c8e7ddd5f1b597f978;p=vim 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 #6518) --- 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; }