diff options
Diffstat (limited to 'xs_match.h')
| -rw-r--r-- | xs_match.h | 7 |
1 files changed, 6 insertions, 1 deletions
| @@ -24,6 +24,7 @@ int xs_match(const char *str, const char *spec) | |||
| 24 | retry: | 24 | retry: |
| 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 | } |