aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-02 11:45:02 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-02 11:45:02 +0000
commitc650096adf12f6a51604d455a6aae7314ab3d1e1 (patch)
tree506691cf4a067fdce41e1ca76ade304f474276bc /re.c
parent040e3e7bddb7269e25b2e88f8135d7fc9bbe1afd (diff)
downloadruby-c650096adf12f6a51604d455a6aae7314ab3d1e1.tar.gz
* re.c (unescape_escaped_nonascii): fix mbclen argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/re.c b/re.c
index 0fc5f10e30..0ecaccccfd 100644
--- a/re.c
+++ b/re.c
@@ -1373,7 +1373,7 @@ unescape_escaped_nonascii(const char **pp, const char *end, rb_encoding *enc,
}
chbuf[chlen++] = byte;
- while (chlen < chmaxlen && chlen != mbclen(chbuf, chbuf+chmaxlen, enc)) {
+ while (chlen < chmaxlen && chlen != mbclen(chbuf, chbuf+chlen, enc)) {
byte = read_escaped_byte(&p, end, err);
if (byte == -1) {
return -1;
@@ -1381,7 +1381,7 @@ unescape_escaped_nonascii(const char **pp, const char *end, rb_encoding *enc,
chbuf[chlen++] = byte;
}
- if (chlen != mbclen(chbuf, chbuf+chmaxlen, enc)) {
+ if (chlen != mbclen(chbuf, chbuf+chlen, enc)) {
strcpy(err, "invalid multibyte escape");
return -1;
}