From e63bf6c08d6546fd5438dd15dec285fac754d676 Mon Sep 17 00:00:00 2001
From: pgen
Date: Mon, 14 May 2018 22:24:03 +0200
Subject: Do not search for UTF-8 chars in empty patterns
---
smenu.c | 7 +++++--
1 file 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 */
/* """"""""""""""""""""""""""""""""""""""""""""""""" */
--
cgit v1.2.3