summaryrefslogtreecommitdiff
path: root/strings/decimal.c
diff options
context:
space:
mode:
Diffstat (limited to 'strings/decimal.c')
-rw-r--r--strings/decimal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index e6d2d9b14dd..90e64ae892f 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -1199,7 +1199,10 @@ int decimal2bin(decimal *from, char *to, int precision, int frac)
else if (fsize0 > fsize1 && frac1x)
{
if (frac0 == frac1)
+ {
frac1x=frac0x;
+ fsize0= fsize1;
+ }
else
{
frac1++;