aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorK.Kosako <kosako@sofnec.co.jp>2018-10-02 13:17:15 +0900
committerK.Kosako <kosako@sofnec.co.jp>2018-10-02 13:17:15 +0900
commite944b31ae1da2da5e56d3bebf267ab3939593563 (patch)
tree02470ac28a63a952d434f077b114ed1670c65d95
parent10c13e14478cd59856a50ca7928d133e48986ad3 (diff)
downloadoniguruma-e944b31ae1da2da5e56d3bebf267ab3939593563.zip
oniguruma-e944b31ae1da2da5e56d3bebf267ab3939593563.tar.gz
oniguruma-e944b31ae1da2da5e56d3bebf267ab3939593563.tar.bz2
fix confusion of ONIG_CHAR_TABLE_SIZE
-rw-r--r--src/regcomp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/regcomp.c b/src/regcomp.c
index ab95d12..9263863 100644
--- a/src/regcomp.c
+++ b/src/regcomp.c
@@ -4651,7 +4651,7 @@ set_sunday_quick_search_skip_table(regex_t* reg, int case_expand,
}
len = (int )(end - s);
- if (len + offset >= ONIG_CHAR_TABLE_SIZE)
+ if (len + offset >= UCHAR_MAX)
return ONIGERR_PARSER_BUG;
*roffset = offset;
@@ -4696,7 +4696,7 @@ set_bmh_search_skip_table(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED,
int i, len;
len = (int )(end - s);
- if (len < ONIG_CHAR_TABLE_SIZE) {
+ if (len < UCHAR_MAX) {
for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) skip[i] = len;
for (i = 0; i < len - 1; i++)
@@ -4713,7 +4713,7 @@ set_bmh_search_skip_table(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED,
#define OPT_EXACT_MAXLEN 24
-#if OPT_EXACT_MAXLEN >= ONIG_CHAR_TABLE_SIZE
+#if OPT_EXACT_MAXLEN >= UCHAR_MAX
#error Too big OPT_EXACT_MAXLEN
#endif