mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
two more places with the same zero-stripping bug
This commit is contained in:
@ -1285,7 +1285,7 @@ static int do_div_mod(decimal *from1, decimal *from2,
|
|||||||
sanity(to);
|
sanity(to);
|
||||||
|
|
||||||
/* removing all the leading zeroes */
|
/* removing all the leading zeroes */
|
||||||
i=prec1 % DIG_PER_DEC1;
|
i=((prec1-1) % DIG_PER_DEC1)+1;
|
||||||
while (prec1 > 0 && *buf1 == 0)
|
while (prec1 > 0 && *buf1 == 0)
|
||||||
{
|
{
|
||||||
prec1-=i;
|
prec1-=i;
|
||||||
@ -1300,7 +1300,7 @@ static int do_div_mod(decimal *from1, decimal *from2,
|
|||||||
for (i=(prec1-1) % DIG_PER_DEC1; *buf1 < powers10[i--]; prec1--) ;
|
for (i=(prec1-1) % DIG_PER_DEC1; *buf1 < powers10[i--]; prec1--) ;
|
||||||
DBUG_ASSERT(prec1 > 0);
|
DBUG_ASSERT(prec1 > 0);
|
||||||
|
|
||||||
i=prec2 % DIG_PER_DEC1;
|
i=((prec2-1) % DIG_PER_DEC1)+1;
|
||||||
while (prec2 > 0 && *buf2 == 0)
|
while (prec2 > 0 && *buf2 == 0)
|
||||||
{
|
{
|
||||||
prec2-=i;
|
prec2-=i;
|
||||||
|
Reference in New Issue
Block a user