summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/strscan/strscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index 44cd0f4131..ac07b39789 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -661,7 +661,7 @@ strscan_getch(VALUE self)
if (EOS_P(p))
return Qnil;
- len = rb_enc_mbclen(CURPTR(p), enc);
+ len = rb_enc_mbclen(CURPTR(p), S_PEND(p), enc);
if (p->curr + len > S_LEN(p)) {
len = S_LEN(p) - p->curr;
}