clang/"dereference of null pointer" #10856

In edit.c insert_execute calls ins_compl_addfrommatch
This commit is contained in:
Ihor Antonov
2019-08-26 14:22:39 -04:00
committed by Justin M. Keyes
parent 7d56c90dff
commit f3cb529774

View File

@@ -3331,7 +3331,7 @@ static void ins_compl_addfrommatch(void)
int len = (int)curwin->w_cursor.col - (int)compl_col;
int c;
compl_T *cp;
assert(compl_shown_match != NULL);
p = compl_shown_match->cp_str;
if ((int)STRLEN(p) <= len) { /* the match is too short */
/* When still at the original match use the first entry that matches