core: fix compilation of empty regular expression (not allowed on FreeBSD)

v2.8-utf8proc
Sébastien Helleu 2019-01-26 10:21:39 +01:00
parent 6d217ca8c5
commit 4d9fd4c4aa
2 changed files with 5 additions and 1 deletions

View File

@ -32,6 +32,7 @@ New features::
Bug fixes::
* core: fix compilation of empty regular expression (not allowed on FreeBSD)
* core: fix forced highlight on messages sent to other buffers (issue #1277)
* buflist: add alternate key codes for kbd:[F1]/kbd:[F2] and kbd:[Alt+F1]/kbd:[Alt+F2] (compatibility with terminals)
* buflist: fix warning displayed when script buffers.pl is loaded (issue #1274)

View File

@ -1204,7 +1204,10 @@ string_regcomp (void *preg, const char *regex, int default_flags)
return -1;
ptr_regex = string_regex_flags (regex, default_flags, &flags);
return regcomp ((regex_t *)preg, ptr_regex, flags);
return regcomp ((regex_t *)preg,
(ptr_regex && ptr_regex[0]) ? ptr_regex : "^",
flags);
}
/*