Mercurial > vim
comparison src/vim9script.c @ 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 | 66386ca8a69f |
children | 8bcd1ee2630b |
comparison
equal
deleted
inserted
replaced
21448:ce67668c796f | 21449:78734d1f6639 |
---|---|
196 { | 196 { |
197 char_u buffer[200]; | 197 char_u buffer[200]; |
198 char_u *funcname; | 198 char_u *funcname; |
199 | 199 |
200 // it could be a user function. | 200 // it could be a user function. |
201 if (STRLEN(name) < sizeof(buffer) - 10) | 201 if (STRLEN(name) < sizeof(buffer) - 15) |
202 funcname = buffer; | 202 funcname = buffer; |
203 else | 203 else |
204 { | 204 { |
205 funcname = alloc(STRLEN(name) + 10); | 205 funcname = alloc(STRLEN(name) + 15); |
206 if (funcname == NULL) | 206 if (funcname == NULL) |
207 return -1; | 207 return -1; |
208 } | 208 } |
209 funcname[0] = K_SPECIAL; | 209 funcname[0] = K_SPECIAL; |
210 funcname[1] = KS_EXTRA; | 210 funcname[1] = KS_EXTRA; |