mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 00:46:30 +00:00
vim-patch:9.0.1614: strlen() called too often for :spellrepall (#23940)
Problem: strlen() called too often for :spellrepall.
Solution: Store the result in a variable. (closes vim/vim#12497)
59f7038536
This commit is contained in:
@@ -2606,7 +2606,7 @@ void ex_spellrepall(exarg_T *eap)
|
||||
}
|
||||
const size_t repl_from_len = strlen(repl_from);
|
||||
const size_t repl_to_len = strlen(repl_to);
|
||||
int addlen = (int)(repl_to_len - repl_from_len);
|
||||
const int addlen = (int)(repl_to_len - repl_from_len);
|
||||
|
||||
const size_t frompatlen = repl_from_len + 7;
|
||||
char *frompat = xmalloc(frompatlen);
|
||||
|
Reference in New Issue
Block a user