]> granicus.if.org Git - onig/commitdiff
fix invalid reference in set_sunday_quick_search_skip_table()
authorK.Kosako <kkosako0@gmail.com>
Wed, 3 Oct 2018 12:42:15 +0000 (21:42 +0900)
committerK.Kosako <kkosako0@gmail.com>
Wed, 3 Oct 2018 12:42:15 +0000 (21:42 +0900)
src/regcomp.c

index 3dfd00c0921311b7ed8d857e5f96ec75fb5e82ff..8e832660817a74dfb7e2aed3b3c744431d532c44 100644 (file)
@@ -4676,8 +4676,8 @@ set_sunday_quick_search_skip_table(regex_t* reg, int case_expand,
         ONIGENC_CODE_TO_MBC(enc, items[k].code[0], buf);
         for (j = 0; j < clen; j++) {
           int z = len - j + (offset - 1);
-          if (skip[p[j]] > z)
-            skip[p[j]] = z;
+          if (skip[buf[j]] > z)
+            skip[buf[j]] = z;
         }
       }
     }