summary refs log tree commit diff
path: root/Src/glob.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/glob.c')
-rw-r--r--Src/glob.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/glob.c b/Src/glob.c
index f8d7b5ad0..ce7de1ed6 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -693,11 +693,13 @@ parsecomplist(char *instr)
     if (*(str = instr) == Inpar && !skipparens(Inpar, Outpar, (char **)&str) &&
         *str == Pound && isset(EXTENDEDGLOB) && str[-2] == '/') {
 	instr++;
-	if (!(p1 = patcompile(instr, compflags, &instr)))
-	    return NULL;
+
 	if (instr[0] == '/' && instr[1] == Outpar && instr[2] == Pound) {
 	    int pdflag = 0;
 
+	    if (!(p1 = patcompile(instr, compflags, &instr)))
+	        return NULL;
+
 	    instr += 3;
 	    if (*instr == Pound) {
 		pdflag = 1;