summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2023-03-27 17:57:02 -0600
committerKarl Williamson <khw@cpan.org>2023-03-30 10:19:13 -0600
commitecf14c7348b18a7ae08c466d7c890cd4443285b7 (patch)
tree894ddf835f7a22468df715c4dac45e9bec2777a3 /locale.c
parent9ed785eddca4c01f5de2ef4bfb539dc2babeceed (diff)
downloadperl-ecf14c7348b18a7ae08c466d7c890cd4443285b7.tar.gz
locale.c: Don't use bit-wise 'or' when bool is meant
This thinko was exposed by smoke tests using an uncommitted test. PEBKAC
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/locale.c b/locale.c
index 86aee10597..46dab5a7a0 100644
--- a/locale.c
+++ b/locale.c
@@ -1985,11 +1985,13 @@ S_new_numeric(pTHX_ const char *newnum, bool force)
* library routines anyway. */
const char * scratch_buffer = NULL;
- PL_numeric_underlying_is_standard &= strEQ(C_thousands_sep,
- my_langinfo_c(THOUSEP, LC_NUMERIC,
- PL_numeric_name,
- &scratch_buffer,
- NULL, NULL));
+ if (PL_numeric_underlying_is_standard) {
+ PL_numeric_underlying_is_standard = strEQ(C_thousands_sep,
+ my_langinfo_c(THOUSEP, LC_NUMERIC,
+ PL_numeric_name,
+ &scratch_buffer,
+ NULL, NULL));
+ }
Safefree(scratch_buffer);
# else