]> granicus.if.org Git - onig/commitdiff
fix bug of code range process
authorK.Kosako <kkosako0@gmail.com>
Thu, 5 May 2016 10:32:23 +0000 (19:32 +0900)
committerK.Kosako <kkosako0@gmail.com>
Thu, 5 May 2016 10:32:23 +0000 (19:32 +0900)
src/regparse.c

index 907f241aa9766c92dc8b431fb10b4c91e2b6c67e..d3ac1d5446cc5b77656da5a6f2bd766be1d8118a 100644 (file)
@@ -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;