From: K.Kosako Date: Thu, 5 May 2016 10:32:23 +0000 (+0900) Subject: fix bug of code range process X-Git-Tag: v6.0.0^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9500670c42427fbbc49c52011d6094f94ed748de;p=onig fix bug of code range process --- diff --git a/src/regparse.c b/src/regparse.c index 907f241..d3ac1d5 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -3660,8 +3660,7 @@ add_ctype_to_cc_by_range(CClassNode* cc, int ctype ARG_UNUSED, int not, for (j = ONIGENC_CODE_RANGE_FROM(mbr, i); j <= ONIGENC_CODE_RANGE_TO(mbr, i); j++) { if (j >= sb_out) { - if (j == ONIGENC_CODE_RANGE_TO(mbr, i)) i++; - else if (j > ONIGENC_CODE_RANGE_FROM(mbr, i)) { + if (j > ONIGENC_CODE_RANGE_FROM(mbr, i)) { r = add_code_range_to_buf(&(cc->mbuf), j, ONIGENC_CODE_RANGE_TO(mbr, i)); if (r != 0) return r;