summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-01-17 13:00:44 -0700
committerKarl Williamson <khw@cpan.org>2018-01-30 22:49:03 -0700
commit12c8ea1ff25065bd849becc3368c606a58fd3514 (patch)
tree29e1af6d06678e0f7d961e01a278828eff4cf7fe /sv.c
parentd2b935c5ff6d7cb5675d22583ef8f480e51d7ba4 (diff)
downloadperl-12c8ea1ff25065bd849becc3368c606a58fd3514.tar.gz
sv_vcatpvfn_flags() Balance LC_NUMERIC changes/restores
Prior to this commit, the restore for LC_NUMERIC was getting called even if there were no corresponding store. Change so they are balanced; a future commit will require this.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index 58d4bf6394..bd655d0d03 100644
--- a/sv.c
+++ b/sv.c
@@ -13329,8 +13329,10 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
SvTAINT(sv);
- RESTORE_LC_NUMERIC(); /* Done outside loop, so don't have to save/restore
- each iteration. */
+ if (lc_numeric_set) {
+ RESTORE_LC_NUMERIC(); /* Done outside loop, so don't have to
+ save/restore each iteration. */
+ }
}
/* =========================================================================