Skip to content

Commit 8de500c

Browse files
committed
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
1 parent 3d23725 commit 8de500c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bignum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2812,7 +2812,7 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
28122812
if (modp) { /* normalize remainder */
28132813
*modp = zz = rb_big_clone(z);
28142814
zds = BDIGITS(zz);
2815-
while (ny > 0 && !zds[ny-1]) --ny;
2815+
while (ny > 1 && !zds[ny-1]) --ny;
28162816
if (dd) {
28172817
t2 = 0; i = ny;
28182818
while(i--) {

0 commit comments

Comments
 (0)