summaryrefslogtreecommitdiff
path: root/regparse.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-25 15:12:19 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-25 15:12:19 (GMT)
commit81c5ede3cab05e9138504c2cdc868ce976bff9ee (patch)
tree7d54ea8070946d93f78b404f9b061a6cd8e35573 /regparse.c
parent415be475933a5af3ba76a239b2883fcc661c97ef (diff)
* regparse.c (add_code_range_to_buf0): fix false negative
warning when given range is just before previous range. [ruby-dev:41406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regparse.c')
-rw-r--r--regparse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/regparse.c b/regparse.c
index eb40cf6..e413f55 100644
--- a/regparse.c
+++ b/regparse.c
@@ -1750,12 +1750,11 @@ add_code_range_to_buf0(BBuf** pbuf, ScanEnv* env, OnigCodePoint from, OnigCodePo
return ONIGERR_TOO_MANY_MULTI_BYTE_RANGES;
if (inc_n != 1) {
+ if (checkdup && to >= data[low*2]) CC_DUP_WARN(env);
if (from > data[low*2])
from = data[low*2];
- else if (checkdup) CC_DUP_WARN(env);
if (to < data[(high - 1)*2 + 1])
to = data[(high - 1)*2 + 1];
- else if (checkdup) CC_DUP_WARN(env);
}
if (inc_n != 0 && (OnigCodePoint )high < n) {