summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/numeric.c b/numeric.c
index 2970dad08a..0f353cffe8 100644
--- a/numeric.c
+++ b/numeric.c
@@ -151,7 +151,7 @@ Perl_grok_bin(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) {
NV value_nv = 0;
const UV max_div_2 = UV_MAX / 2;
- const bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
+ const bool allow_underscores = (bool)(*flags & PERL_SCAN_ALLOW_UNDERSCORES);
bool overflowed = FALSE;
char bit;
@@ -268,7 +268,7 @@ Perl_grok_hex(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) {
NV value_nv = 0;
const UV max_div_16 = UV_MAX / 16;
- const bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
+ const bool allow_underscores = (bool)(*flags & PERL_SCAN_ALLOW_UNDERSCORES);
bool overflowed = FALSE;
if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
@@ -382,7 +382,7 @@ Perl_grok_oct(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) {
NV value_nv = 0;
const UV max_div_8 = UV_MAX / 8;
- const bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
+ const bool allow_underscores = (bool)(*flags & PERL_SCAN_ALLOW_UNDERSCORES);
bool overflowed = FALSE;
for (; len-- && *s; s++) {