summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/d2s.c2
-rw-r--r--src/common/f2s.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/common/d2s.c b/src/common/d2s.c
index 58f60977a54..1e4782c10a4 100644
--- a/src/common/d2s.c
+++ b/src/common/d2s.c
@@ -1028,7 +1028,7 @@ double_to_shortest_decimal_bufn(double f, char *result)
/* Case distinction; exit early for the easy cases. */
if (ieeeExponent == ((1u << DOUBLE_EXPONENT_BITS) - 1u) || (ieeeExponent == 0 && ieeeMantissa == 0))
{
- return copy_special_str(result, ieeeSign, ieeeExponent, ieeeMantissa);
+ return copy_special_str(result, ieeeSign, (ieeeExponent != 0), (ieeeMantissa != 0));
}
floating_decimal_64 v;
diff --git a/src/common/f2s.c b/src/common/f2s.c
index 62432a539e7..ff22b56c926 100644
--- a/src/common/f2s.c
+++ b/src/common/f2s.c
@@ -756,7 +756,7 @@ float_to_shortest_decimal_bufn(float f, char *result)
/* Case distinction; exit early for the easy cases. */
if (ieeeExponent == ((1u << FLOAT_EXPONENT_BITS) - 1u) || (ieeeExponent == 0 && ieeeMantissa == 0))
{
- return copy_special_str(result, ieeeSign, ieeeExponent, ieeeMantissa);
+ return copy_special_str(result, ieeeSign, (ieeeExponent != 0), (ieeeMantissa != 0));
}
floating_decimal_32 v;