summaryrefslogtreecommitdiff
blob: eb0d7677c23606e58544c934e24a81c1646ce62c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- sbr/m_getfld.orig.c	2004-07-26 22:07:25.169562740 -0700
+++ sbr/m_getfld.c	2004-07-26 22:09:39.377799518 -0700
@@ -727,9 +727,10 @@
 	register char pc = *pat++;
 
 	for(;;) {
-		while (pc != *str++)
-			if (str > es)
-				return 0;
+		while (str <= es && pc != *str)
+			str++;
+		if (str++ > es)
+			return 0;
 
 		sp = str; pp = pat;
 		while (pp < ep && *sp++ == *pp)