This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_sv_vcatpvfn_flags: comment %n deficiency
authorDavid Mitchell <davem@iabyn.com>
Wed, 24 May 2017 14:58:06 +0000 (15:58 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 7 Jun 2017 08:11:03 +0000 (09:11 +0100)
This should be fixed sometime:

    /* XXX if sv was originally non-utf8 with a char in the
     * range 0x80-0xff, then if it got upgraded, we should
     * calculate char len rather than byte len here */

sv.c

diff --git a/sv.c b/sv.c
index 7c8271e..489cbea 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -13009,6 +13009,9 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
                 int i;
                 if (vectorize)
                     goto unknown;
+                /* XXX if sv was originally non-utf8 with a char in the
+                 * range 0x80-0xff, then if it got upgraded, we should
+                 * calculate char len rather than byte len here */
                 i = SvCUR(sv) - origlen;
                 if (args) {
                     switch (intsize) {