This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Address Hugo's comment on Dave's change (26240)
authorNicholas Clark <nick@ccl4.org>
Fri, 2 Dec 2005 17:15:27 +0000 (17:15 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 2 Dec 2005 17:15:27 +0000 (17:15 +0000)
p4raw-id: //depot/perl@26244

sv.c

diff --git a/sv.c b/sv.c
index cf30025..b645426 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -8360,8 +8360,13 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
        if (vectorize)
            argsv = vecsv;
        else if (!args) {
-           I32 i = efix ? efix-1 : svix++;
-           argsv = (i >= 0 && i < svmax) ? svargs[i] : &PL_sv_undef;
+           if (efix) {
+               const I32 i = efix-1;
+               argsv = (i >= 0 && i < svmax) ? svargs[i] : &PL_sv_undef;
+           } else {
+               argsv = (svix >= 0 && svix < svmax)
+                   ? svargs[svix++] : &PL_sv_undef;
+           }
        }
 
        switch (c = *q++) {