clang/"null pointer dereference": insert_execute

This commit is contained in:
Justin M. Keyes 2019-04-01 03:05:03 +02:00
parent e32c9f888b
commit cf4e14c746

View File

@ -667,8 +667,9 @@ static int insert_execute(VimState *state, int key)
// there is nothing to add, CTRL-L works like CTRL-P then. // there is nothing to add, CTRL-L works like CTRL-P then.
if (s->c == Ctrl_L if (s->c == Ctrl_L
&& (!CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode) && (!CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)
|| (int)STRLEN(compl_shown_match->cp_str) || (compl_shown_match->cp_str != NULL
> curwin->w_cursor.col - compl_col)) { && (int)STRLEN(compl_shown_match->cp_str)
> curwin->w_cursor.col - compl_col))) {
ins_compl_addfrommatch(); ins_compl_addfrommatch();
return 1; // continue return 1; // continue
} }