@@ -2781,6 +2781,7 @@ uint32_t *verbstartptr = NULL;
2781
2781
uint32_t * previous_callout = NULL ;
2782
2782
uint32_t * parsed_pattern = cb -> parsed_pattern ;
2783
2783
uint32_t * parsed_pattern_end = cb -> parsed_pattern_end ;
2784
+ uint32_t * this_parsed_item = NULL ;
2784
2785
uint32_t meta_quantifier = 0 ;
2785
2786
uint32_t add_after_mark = 0 ;
2786
2787
uint32_t xoptions = cb -> cx -> extra_options ;
@@ -2866,10 +2867,11 @@ while (ptr < ptrend)
2866
2867
uint32_t xset , xunset , * xoptset ;
2867
2868
uint32_t terminator ;
2868
2869
uint32_t prev_meta_quantifier ;
2870
+ uint32_t * prev_parsed_item = this_parsed_item ;
2869
2871
BOOL prev_okquantifier ;
2870
2872
PCRE2_SPTR tempptr ;
2871
2873
PCRE2_SIZE offset ;
2872
-
2874
+
2873
2875
if (parsed_pattern >= parsed_pattern_end )
2874
2876
{
2875
2877
errorcode = ERR63 ; /* Internal error (parsed pattern overflow) */
@@ -2881,6 +2883,10 @@ while (ptr < ptrend)
2881
2883
errorcode = ERR19 ;
2882
2884
goto FAILED ; /* Parentheses too deeply nested */
2883
2885
}
2886
+
2887
+ /* Remember where this item started */
2888
+
2889
+ this_parsed_item = parsed_pattern ;
2884
2890
2885
2891
/* Get next input character, save its position for callout handling. */
2886
2892
@@ -3173,7 +3179,6 @@ while (ptr < ptrend)
3173
3179
continue ; /* Next character in pattern */
3174
3180
}
3175
3181
3176
-
3177
3182
/* Process the next item in the main part of a pattern. */
3178
3183
3179
3184
switch (c )
@@ -3450,7 +3455,7 @@ while (ptr < ptrend)
3450
3455
wrapping it in non-capturing brackets, but we have to allow for a preceding
3451
3456
(*MARK) for when (*ACCEPT) has an argument. */
3452
3457
3453
- if (parsed_pattern [ -1 ] == META_ACCEPT )
3458
+ if (* prev_parsed_item == META_ACCEPT )
3454
3459
{
3455
3460
uint32_t * p ;
3456
3461
for (p = parsed_pattern - 1 ; p >= verbstartptr ; p -- ) p [1 ] = p [0 ];
0 commit comments