feedback: replace an assert with a check plus error message at startup
parent
f585403b36
commit
408f15954e
|
@ -1130,6 +1130,9 @@ void parse_rcfile(FILE *rcstream, bool syntax_only)
|
|||
if (has_blank_char(option)) {
|
||||
rcfile_error(N_("Non-blank characters required"));
|
||||
free(option);
|
||||
} else if (mbstrlen(option) % 2 != 0) {
|
||||
rcfile_error(N_("Even number of characters required"));
|
||||
free(option);
|
||||
} else
|
||||
matchbrackets = option;
|
||||
} else if (strcasecmp(rcopts[i].name, "whitespace") == 0) {
|
||||
|
|
|
@ -943,8 +943,6 @@ void do_find_bracket(void)
|
|||
bool reverse;
|
||||
/* The direction we search. */
|
||||
|
||||
assert(mbstrlen(matchbrackets) % 2 == 0);
|
||||
|
||||
ch = mbstrchr(matchbrackets, openfile->current->data + openfile->current_x);
|
||||
|
||||
if (ch == NULL) {
|
||||
|
|
Loading…
Reference in New Issue