mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 09:02:13 +02:00
Do not compile the regexp if the input string is empty.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4569 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
0f33f40e7f
commit
bc45b39030
1 changed files with 1 additions and 1 deletions
|
|
@ -463,7 +463,7 @@ GList *textbuffer_find_text(TEXT_BUFFER_REC *buffer, LINE_REC *startline,
|
||||||
g_return_val_if_fail(buffer != NULL, NULL);
|
g_return_val_if_fail(buffer != NULL, NULL);
|
||||||
g_return_val_if_fail(text != NULL, NULL);
|
g_return_val_if_fail(text != NULL, NULL);
|
||||||
|
|
||||||
if (regexp) {
|
if (regexp && *text != '\0') {
|
||||||
#ifdef HAVE_REGEX_H
|
#ifdef HAVE_REGEX_H
|
||||||
int flags = REG_EXTENDED | REG_NOSUB |
|
int flags = REG_EXTENDED | REG_NOSUB |
|
||||||
(case_sensitive ? 0 : REG_ICASE);
|
(case_sensitive ? 0 : REG_ICASE);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue