diff options
| author | 2022-10-07 13:48:53 +0200 | |
|---|---|---|
| committer | 2022-10-07 13:48:53 +0200 | |
| commit | a4cf695e60e0d4f79638cb1f37f78b524411efcf (patch) | |
| tree | 3db5747f1f75e67bf5785c18b6753bfa80d6a9fa /xs_regex.h | |
| parent | Don't indent entry children beyond 4. (diff) | |
| download | snac2-a4cf695e60e0d4f79638cb1f37f78b524411efcf.tar.gz snac2-a4cf695e60e0d4f79638cb1f37f78b524411efcf.tar.xz snac2-a4cf695e60e0d4f79638cb1f37f78b524411efcf.zip | |
Backport from xs.
Diffstat (limited to 'xs_regex.h')
| -rw-r--r-- | xs_regex.h | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -60,9 +60,10 @@ d_char *xs_regex_match_n(const char *str, const char *rx, int count) | |||
| 60 | int n = 0; | 60 | int n = 0; |
| 61 | 61 | ||
| 62 | /* split */ | 62 | /* split */ |
| 63 | p = split = xs_regex_split_n(str, rx, count); | 63 | split = xs_regex_split_n(str, rx, count); |
| 64 | 64 | ||
| 65 | /* now iterate to get only the 'separators' (odd ones) */ | 65 | /* now iterate to get only the 'separators' (odd ones) */ |
| 66 | p = split; | ||
| 66 | while (xs_list_iter(&p, &v)) { | 67 | while (xs_list_iter(&p, &v)) { |
| 67 | if (n & 0x1) | 68 | if (n & 0x1) |
| 68 | list = xs_list_append(list, v); | 69 | list = xs_list_append(list, v); |