diff --git a/src/rcfile.c b/src/rcfile.c index 674195a1..dd7d7d72 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -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) { diff --git a/src/search.c b/src/search.c index 4aaf42f5..723088ce 100644 --- a/src/search.c +++ b/src/search.c @@ -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) {