diff options
| author | default <nobody@localhost> | 2025-01-28 07:42:08 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2025-01-28 07:42:08 +0100 |
| commit | 492b91e4e47c43d15bb828ecbe1e4195c47c31f8 (patch) | |
| tree | 2a0784dde0119899a8cda2ee8e4d87cd66bd7815 /xs_match.h | |
| parent | 1766d6bf92eb433841c03ccb096c636a4c5dc968 (diff) | |
Backport from xs.
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) retry: for (;;) { + const char *q = spec; char c = *str++; char p = *spec++; @@ -63,8 +64,12 @@ retry: spec = b_spec; str = ++b_str; } - else + else { + if (*q == '|') + spec = q; + break; + } } } } |