comparison src/filepath.c @ 29113:495d55210aac v8.2.5077

patch 8.2.5077: various warnings from clang on MS-Windows Commit: https://github.com/vim/vim/commit/a34b4460c2843c67a35a2d236b01e6cb9bc38734 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Jun 11 10:43:26 2022 +0100 patch 8.2.5077: various warnings from clang on MS-Windows Problem: Various warnings from clang on MS-Windows. Solution: Avoid the warnings. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/10553)
author Bram Moolenaar <Bram@vim.org>
date Sat, 11 Jun 2022 11:45:04 +0200
parents 3ddaf476a874
children da56650de132
comparison
equal deleted inserted replaced
29112:a8ee24a8bde1 29113:495d55210aac
189 STRNCPY(save_fname, short_fname, len); 189 STRNCPY(save_fname, short_fname, len);
190 save_fname = NULL; 190 save_fname = NULL;
191 } 191 }
192 192
193 // concat the not-shortened part of the path 193 // concat the not-shortened part of the path
194 vim_strncpy(*fname + len, endp, sfx_len); 194 if ((*fname + len) != endp)
195 vim_strncpy(*fname + len, endp, sfx_len);
195 (*fname)[new_len] = NUL; 196 (*fname)[new_len] = NUL;
196 } 197 }
197 198
198 theend: 199 theend:
199 vim_free(pbuf_unused); 200 vim_free(pbuf_unused);