mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
vim-patch:9.1.1063: too many strlen() calls in userfunc.c
Problem: too many strlen() calls in userfunc.c
Solution: refactor userfunc.c and remove calls to strlen(),
drop set_ufunc_name() and roll it into alloc_ufunc(),
check for out-of-memory condition in trans_function_name_ext()
(John Marriott)
closes: vim/vim#16537
b32800f7c5
Add missing change to call_user_func() from patch 8.1.1007.
Consistently use PRIdSCID instead of PRId64 for script IDs.
Co-authored-by: John Marriott <basilisk@internode.on.net>
This commit is contained in:
@@ -917,7 +917,7 @@ char *replace_termcodes(const char *const from, const size_t from_len, char **co
|
||||
result[dlen++] = (char)K_SPECIAL;
|
||||
result[dlen++] = (char)KS_EXTRA;
|
||||
result[dlen++] = KE_SNR;
|
||||
snprintf(result + dlen, buf_len - dlen, "%" PRId64, (int64_t)sid);
|
||||
snprintf(result + dlen, buf_len - dlen, "%" PRIdSCID, sid);
|
||||
dlen += strlen(result + dlen);
|
||||
result[dlen++] = '_';
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user