diff options
author | Karl Williamson <khw@cpan.org> | 2023-03-27 17:57:02 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2023-03-30 10:19:13 -0600 |
commit | ecf14c7348b18a7ae08c466d7c890cd4443285b7 (patch) | |
tree | 894ddf835f7a22468df715c4dac45e9bec2777a3 | |
parent | 9ed785eddca4c01f5de2ef4bfb539dc2babeceed (diff) | |
download | perl-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
-rw-r--r-- | locale.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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 |