mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
bignum.c: keep first zero
* bignum.c (bigdivrem): keep first digit even if zero. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3d23725ab9
commit
8de500cefc
1 changed files with 1 additions and 1 deletions
2
bignum.c
2
bignum.c
|
@ -2812,7 +2812,7 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
|
|||
if (modp) { /* normalize remainder */
|
||||
*modp = zz = rb_big_clone(z);
|
||||
zds = BDIGITS(zz);
|
||||
while (ny > 0 && !zds[ny-1]) --ny;
|
||||
while (ny > 1 && !zds[ny-1]) --ny;
|
||||
if (dd) {
|
||||
t2 = 0; i = ny;
|
||||
while(i--) {
|
||||
|
|
Loading…
Reference in a new issue