This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document new versions of Data::Dumper and XS::APItest.
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index 829ff86..58142ab 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -9883,7 +9883,7 @@ S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims)
        termlen = 1;
     }
     else {
-       termcode = utf8_to_uvchr((U8*)s, &termlen);
+       termcode = utf8_to_uvchr_buf((U8*)s, (U8*)PL_bufend, &termlen);
        Copy(s, termstr, termlen, U8);
        if (!UTF8_IS_INVARIANT(term))
            has_utf8 = TRUE;