From 12ff11af13721776d90a11cc8704a0f54800a9a9 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 11 Apr 2021 06:07:25 -0600 Subject: [PATCH] locale.c: Mv line of code later in fcn This avoids setting this until needed. --- locale.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/locale.c b/locale.c index 23d2943332f0..b17a34bd9ec4 100644 --- a/locale.c +++ b/locale.c @@ -1605,7 +1605,6 @@ S_new_numeric(pTHX_ const char *newnum) * such platforms. */ - PL_numeric_underlying = TRUE; /* Save the new name if it isn't the same as the previous one, if any */ if (PL_numeric_name && strEQ(PL_numeric_name, newnum)) { @@ -1616,6 +1615,10 @@ S_new_numeric(pTHX_ const char *newnum) PL_numeric_name = savepv(newnum); } + /* We are in the underlying locale until changed at the end of this + * function */ + PL_numeric_underlying = TRUE; + # ifdef USE_POSIX_2008_LOCALE /* We keep a special object for easy switching to */