summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-12-23 09:07:50 +0000
committerZefram <zefram@fysh.org>2017-12-23 09:07:50 +0000
commit049809883fe65af212c1837f94e2256d13de60ac (patch)
tree7f7f709efd761c683c58d264bcd370d0414df78e /sv.c
parentb98da25d1df8fcfc0b2bcb79d46a7624d3d98ea5 (diff)
downloadperl-049809883fe65af212c1837f94e2256d13de60ac.tar.gz
narrow scope of argsv in sv_vcatpvfn_flags()
argsv was being retained between format specifiers, causing incorrect treatment of format specifiers following one that took an SV argument. Fixes [perl #132645].
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 7e3987cc98..a79c033a3d 100644
--- a/sv.c
+++ b/sv.c
@@ -11814,7 +11814,6 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
STRLEN origlen;
Size_t svix = 0;
static const char nullstr[] = "(null)";
- SV *argsv = NULL;
bool has_utf8 = DO_UTF8(sv); /* has the result utf8? */
const bool pat_utf8 = has_utf8; /* the pattern is in utf8? */
/* Times 4: a decimal digit takes more than 3 binary digits.
@@ -11919,6 +11918,7 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
Size_t efix = 0; /* explicit format parameter index */
const Size_t osvix = svix; /* original index in case of bad fmt */
+ SV *argsv = NULL;
bool is_utf8 = FALSE; /* is this item utf8? */
bool arg_missing = FALSE; /* give "Missing argument" warning */
char esignbuf[4]; /* holds sign prefix, e.g. "-0x" */