mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
vim-patch:9.1.0870: too many strlen() calls in eval.c (#31267)
Problem: too many strlen() calls in eval.c
Solution: Refactor eval.c to remove calls to STRLEN()
(John Marriott)
closes: vim/vim#16066
bd4614f43d
Co-authored-by: John Marriott <basilisk@internode.on.net>
This commit is contained in:
@@ -7848,8 +7848,8 @@ static void f_substitute(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
|| flg == NULL) {
|
||||
rettv->vval.v_string = NULL;
|
||||
} else {
|
||||
rettv->vval.v_string = do_string_sub((char *)str, (char *)pat,
|
||||
(char *)sub, expr, (char *)flg);
|
||||
rettv->vval.v_string = do_string_sub((char *)str, strlen(str), (char *)pat,
|
||||
(char *)sub, expr, (char *)flg, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user