summaryrefslogtreecommitdiff
path: root/xs_match.h
diff options
context:
space:
mode:
Diffstat (limited to 'xs_match.h')
-rw-r--r--xs_match.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/xs_match.h b/xs_match.h
index 0b89ac8..76c1bf3 100644
--- a/xs_match.h
+++ b/xs_match.h
@@ -24,6 +24,7 @@ int xs_match(const char *str, const char *spec)
24retry: 24retry:
25 25
26 for (;;) { 26 for (;;) {
27 const char *q = spec;
27 char c = *str++; 28 char c = *str++;
28 char p = *spec++; 29 char p = *spec++;
29 30
@@ -63,8 +64,12 @@ retry:
63 spec = b_spec; 64 spec = b_spec;
64 str = ++b_str; 65 str = ++b_str;
65 } 66 }
66 else 67 else {
68 if (*q == '|')
69 spec = q;
70
67 break; 71 break;
72 }
68 } 73 }
69 } 74 }
70 } 75 }