summaryrefslogtreecommitdiff
path: root/enc/utf_8.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-05 00:54:11 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-05 00:54:11 (GMT)
commited37bfcc9d4306e47f4c73e0eeca202cb1e00d9d (patch)
tree93b609a02094a7a57d442a2e034a5045fa2400a0 /enc/utf_8.c
parent660fed67411b977d8995cba150d0b05a3fddeb50 (diff)
broken utf-8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/utf_8.c')
-rw-r--r--enc/utf_8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/enc/utf_8.c b/enc/utf_8.c
index dae1f3a..46ef6d6 100644
--- a/enc/utf_8.c
+++ b/enc/utf_8.c
@@ -233,12 +233,12 @@ mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_UTF8[firstbyte]-2);
s = trans[s][*p++];
if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(3) :
- ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+ ONIGENC_CONSTRUCT_MBCLEN_INVALID2(2);
if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_UTF8[firstbyte]-3);
s = trans[s][*p++];
return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(4) :
- ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+ ONIGENC_CONSTRUCT_MBCLEN_INVALID2(3);
}
static int