Project

General

Profile

Backport #8210 ยป fix-8210-1-update.diff

k_takata (Ken Takata), 04/13/2013 07:31 PM

View differences:

regexec.c
4020 4020
	  start = min_semi_end - reg->anchor_dmax;
4021 4021
	  if (start < end)
4022 4022
	    start = onigenc_get_right_adjust_char_head(reg->enc, str, start, end);
4023
	  else { /* match with empty at end */
4024
	    start = onigenc_get_prev_char_head(reg->enc, str, end, end);
4025
	  }
4026 4023
	}
4027 4024
	if ((OnigDistance )(max_semi_end - (range - 1)) < reg->anchor_dmin) {
4028 4025
	  range = max_semi_end - reg->anchor_dmin + 1;
4029 4026
	}
4030 4027

  
4031
	if (start >= range) goto mismatch_no_msa;
4028
	if (start > range) goto mismatch_no_msa;
4029
	/* If start == range, match with empty at end.
4030
	   Backward search is used. */
4032 4031
      }
4033 4032
      else {
4034 4033
	if ((OnigDistance )(min_semi_end - range) > reg->anchor_dmax) {