aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
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;
}