Skip to content

Commit

Permalink
locale.c: Mv line of code later in fcn
Browse files Browse the repository at this point in the history
This avoids setting this until needed.
  • Loading branch information
khwilliamson committed Sep 1, 2022
1 parent 759f440 commit 3d3a0c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion locale.c
Original file line number Diff line number Diff line change
Expand Up @@ -1696,14 +1696,17 @@ 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 (strNE(PL_numeric_name, newnum)) {
Safefree(PL_numeric_name);
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 */
Expand Down

0 comments on commit 3d3a0c7

Please sign in to comment.