comparison src/userfunc.c @ 19225:77cd94083850 v8.2.0171

patch 8.2.0171: Coverity warning for using uninitialized buffer Commit: https://github.com/vim/vim/commit/9a5e5a3e33bb86ba5209278e83ec60790f80d15c Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 28 23:09:23 2020 +0100 patch 8.2.0171: Coverity warning for using uninitialized buffer Problem: Coverity warning for using uninitialized buffer. Solution: Check the skip flag.
author Bram Moolenaar <Bram@vim.org>
date Tue, 28 Jan 2020 23:15:04 +0100
parents e7b4fff348dd
children a8d2d3c8f0b3
comparison
equal deleted inserted replaced
19224:743c2d8e09bd 19225:77cd94083850
2186 } 2186 }
2187 2187
2188 name = alloc(len + lead + extra + 1); 2188 name = alloc(len + lead + extra + 1);
2189 if (name != NULL) 2189 if (name != NULL)
2190 { 2190 {
2191 if (lead > 0 || vim9script) 2191 if (!skip && (lead > 0 || vim9script))
2192 { 2192 {
2193 name[0] = K_SPECIAL; 2193 name[0] = K_SPECIAL;
2194 name[1] = KS_EXTRA; 2194 name[1] = KS_EXTRA;
2195 name[2] = (int)KE_SNR; 2195 name[2] = (int)KE_SNR;
2196 if (vim9script || lead > 3) // If it's "<SID>" 2196 if (vim9script || lead > 3) // If it's "<SID>"