This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Adjust need size for locale radix.
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 14 Aug 2014 20:03:27 +0000 (16:03 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 15 Aug 2014 02:38:29 +0000 (22:38 -0400)
sv.c

diff --git a/sv.c b/sv.c
index c737a06..7ba7a78 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -11456,7 +11456,12 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
                         2 + /* "p+" */
                         (i >= 0 ? BIT_DIGITS(i) : 1 + BIT_DIGITS(-i)) +
                         1;   /* \0 */
-                    /* XXX if PL_numeric_radix_sv && IN_LC(LC_NUMERIC) */
+#ifdef USE_LOCALE_NUMERIC
+                        STORE_LC_NUMERIC_SET_TO_NEEDED();
+                        if (PL_numeric_radix_sv && IN_LC(LC_NUMERIC))
+                            need += SvLEN(PL_numeric_radix_sv);
+                        RESTORE_LC_NUMERIC();
+#endif
                 } else if (i > 0) {
                     need = BIT_DIGITS(i);
                 } /* if i < 0, the number of digits is hard to predict. */