summaryrefslogtreecommitdiffstats
path: root/smenu.c
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2018-05-14 22:24:03 +0200
committerpgen <p.gen.progs@gmail.com>2018-05-14 22:24:50 +0200
commite63bf6c08d6546fd5438dd15dec285fac754d676 (patch)
tree565ca89962ec74cbcf221c4216ff8d376e0a4878 /smenu.c
parent1dede6e7c31cb5495596490588b5f789035395e4 (diff)
Do not search for UTF-8 chars in empty patterns
Diffstat (limited to 'smenu.c')
-rw-r--r--smenu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/smenu.c b/smenu.c
index c98ef8b..f846a64 100644
--- a/smenu.c
+++ b/smenu.c
@@ -6723,8 +6723,11 @@ main(int argc, char * argv[])
/* Replace the UTF-8 ascii representations by their binary values in */
/* the inclusion and exclusion patterns. */
/* """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
- mb_interpret(include_pattern, &langinfo);
- mb_interpret(exclude_pattern, &langinfo);
+ if (include_pattern != NULL)
+ mb_interpret(include_pattern, &langinfo);
+
+ if (exclude_pattern != NULL)
+ mb_interpret(exclude_pattern, &langinfo);
/* Force the right modes when the -C option is given */
/* """"""""""""""""""""""""""""""""""""""""""""""""" */