Commit 77cb61d2 authored by unknown's avatar unknown

Fix for bug #9527 (negative zero is a nonsence)


strings/decimal.c:
  added the check to make sure we don't ge -0.00
parent 0228f897
......@@ -1924,6 +1924,17 @@ int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to)
for (; carry; buf0--)
ADD(*buf0, *buf0, 0, carry);
}
/* Now we have to check for -0.000 case */
if (to->sign)
{
dec1 *buf= to->buf;
dec1 *end= to->buf + intg0 + frac0;
for (; (buf<end) && !*buf; buf++);
if (buf == end)
/* So we got decimal zero */
decimal_make_zero(to);
}
return error;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment