diff options
author | unknown <serg@serg.mylan> | 2004-10-31 00:02:13 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-10-31 00:02:13 +0200 |
commit | b4d0ae29660f72ed5d7301a88e6b240729fac7a2 (patch) | |
tree | c6dbdde880e2e01467b2ac8c40febc7489b055cd /strings | |
parent | 2aebffaac75986961ab7f6558694a18f4f2c9a78 (diff) | |
download | mariadb-git-b4d0ae29660f72ed5d7301a88e6b240729fac7a2.tar.gz |
two more places with the same zero-stripping bug
Diffstat (limited to 'strings')
-rw-r--r-- | strings/decimal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/decimal.c b/strings/decimal.c index de6e99eabdd..d523480b073 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -1285,7 +1285,7 @@ static int do_div_mod(decimal *from1, decimal *from2, sanity(to); /* removing all the leading zeroes */ - i=prec1 % DIG_PER_DEC1; + i=((prec1-1) % DIG_PER_DEC1)+1; while (prec1 > 0 && *buf1 == 0) { 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--) ; DBUG_ASSERT(prec1 > 0); - i=prec2 % DIG_PER_DEC1; + i=((prec2-1) % DIG_PER_DEC1)+1; while (prec2 > 0 && *buf2 == 0) { prec2-=i; |