diff options
| author | Paul Eggert | 2013-12-12 16:51:47 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-12-12 16:51:47 -0800 |
| commit | a3fab1ec17f05e2782dcde814018fc48a3bbebb9 (patch) | |
| tree | fa32a4dca395ebedb30c2f838fe27618d5e77e89 /src | |
| parent | 2bc170c3f1a3661f31a868d7bac9b3b3909dc576 (diff) | |
| download | emacs-a3fab1ec17f05e2782dcde814018fc48a3bbebb9.tar.gz emacs-a3fab1ec17f05e2782dcde814018fc48a3bbebb9.zip | |
Fix bug in previous regex.c change, which broke a\{2,}.
Diffstat (limited to 'src')
| -rw-r--r-- | src/regex.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/regex.c b/src/regex.c index faa645cdd28..75f7de34646 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -3311,15 +3311,15 @@ regex_compile (const_re_char *pattern, size_t size, reg_syntax_t syntax, | |||
| 3311 | GET_INTERVAL_COUNT (lower_bound); | 3311 | GET_INTERVAL_COUNT (lower_bound); |
| 3312 | 3312 | ||
| 3313 | if (c == ',') | 3313 | if (c == ',') |
| 3314 | { | 3314 | GET_INTERVAL_COUNT (upper_bound); |
| 3315 | GET_INTERVAL_COUNT (upper_bound); | ||
| 3316 | if (upper_bound < lower_bound) | ||
| 3317 | FREE_STACK_RETURN (REG_BADBR); | ||
| 3318 | } | ||
| 3319 | else | 3315 | else |
| 3320 | /* Interval such as `{1}' => match exactly once. */ | 3316 | /* Interval such as `{1}' => match exactly once. */ |
| 3321 | upper_bound = lower_bound; | 3317 | upper_bound = lower_bound; |
| 3322 | 3318 | ||
| 3319 | if (lower_bound < 0 | ||
| 3320 | || (0 <= upper_bound && upper_bound < lower_bound)) | ||
| 3321 | FREE_STACK_RETURN (REG_BADBR); | ||
| 3322 | |||
| 3323 | if (!(syntax & RE_NO_BK_BRACES)) | 3323 | if (!(syntax & RE_NO_BK_BRACES)) |
| 3324 | { | 3324 | { |
| 3325 | if (c != '\\') | 3325 | if (c != '\\') |