diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-05-30 13:57:41 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-05-31 05:50:41 +0800 |
commit | df2c3b204b9622687d0cd7dd59cbd3f89d9383ce (patch) | |
tree | f94e4d9494b5a5a48b4fbf345db7e3d8f8784d48 /src/nvim/strings.c | |
parent | 783f6079b824539bdc4a168ecfebddab474b2924 (diff) | |
download | rneovim-df2c3b204b9622687d0cd7dd59cbd3f89d9383ce.tar.gz rneovim-df2c3b204b9622687d0cd7dd59cbd3f89d9383ce.tar.bz2 rneovim-df2c3b204b9622687d0cd7dd59cbd3f89d9383ce.zip |
vim-patch:9.1.0449: MS-Windows: Compiler warnings
Problem: MS-Windows: Compiler warnings
Solution: Resolve size_t to int warnings
closes: vim/vim#14874
A couple of warnings in ex_docmd.c have been resolved by modifying their
function argument types, followed by some changes in various function
call sites. This also allowed removal of some casts to cope with
size_t/int conversion.
https://github.com/vim/vim/commit/51024bbc1a9e298b1fb8f2e465fccb5db409551e
Co-authored-by: Mike Williams <mrmrdubya@gmail.com>
Diffstat (limited to 'src/nvim/strings.c')
-rw-r--r-- | src/nvim/strings.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/strings.c b/src/nvim/strings.c index 16ae35272b..485551da6e 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -266,11 +266,11 @@ char *vim_strsave_shellescape(const char *string, bool do_special, bool do_newli *d++ = *p++; continue; } - if (do_special && find_cmdline_var(p, &l) >= 0) { + if (do_special && find_cmdline_var(p, &l) >= 0 && l > 0) { *d++ = '\\'; // insert backslash - while (--l != SIZE_MAX) { // copy the var + do { // copy the var *d++ = *p++; - } + } while (--l > 0); continue; } if (*p == '\\' && fish_like) { |