diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2007-06-28 18:29:03 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2007-06-28 18:29:03 +0000 |
commit | bc45b39030154e059fc7b53a237c90f421130854 (patch) | |
tree | 9fbc976035e8e3baab3deff13ebded3cabf077c7 /src/fe-text/textbuffer.c | |
parent | 0f33f40e7f2180b639485c03a1b037d22b06042f (diff) | |
download | irssi-bc45b39030154e059fc7b53a237c90f421130854.zip |
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
Diffstat (limited to 'src/fe-text/textbuffer.c')
-rw-r--r-- | src/fe-text/textbuffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fe-text/textbuffer.c b/src/fe-text/textbuffer.c index de8236fe..d96f080a 100644 --- a/src/fe-text/textbuffer.c +++ b/src/fe-text/textbuffer.c @@ -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(text != NULL, NULL); - if (regexp) { + if (regexp && *text != '\0') { #ifdef HAVE_REGEX_H int flags = REG_EXTENDED | REG_NOSUB | (case_sensitive ? 0 : REG_ICASE); |