about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/glob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/glob.c b/Src/glob.c
index f0fbe2ba1..27a351137 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -2172,7 +2172,7 @@ igetmatch(char **sp, Patprog p, int fl, int n, char *replstr)
 		for (; t < s + l; t++, patoffset++) {
 		    /* Find the longest match from this position. */
 		    set_pat_start(p, t-s);
-		    if (pattry(p, t) && patinput > t) {
+		    if (pattry(p, t)) {
 			char *mpos = patinput;
 			if (!(fl & SUB_LONG) && !(p->flags & PAT_PURES)) {
 			    char *ptr;
@@ -2252,7 +2252,7 @@ igetmatch(char **sp, Patprog p, int fl, int n, char *replstr)
 		if (t > s && t[-1] == Meta)
 		    t--;
 		set_pat_start(p, t-s);
-		if (pattry(p, t) && patinput > t && !--n) {
+		if (pattry(p, t) && !--n) {
 		    /* Found the longest match */
 		    char *mpos = patinput;
 		    if (!(fl & SUB_LONG) && !(p->flags & PAT_PURES)) {