about summary refs log tree commit diff
path: root/Src/pattern.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/pattern.c')
-rw-r--r--Src/pattern.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/pattern.c b/Src/pattern.c
index 33c8858a2..71f2f379c 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -688,7 +688,10 @@ patcompbranch(int *flagp)
 			continue;
 		    }
 		}
-	    }
+	    } else if (!*patparse)
+		break;
+	    else
+		continue;
 	} else if (isset(EXTENDEDGLOB) && *patparse == Hat) {
 	    /*
 	     * ^pat:  anything but pat.  For proper backtracking,