bigint.c (udiv): xx%yy should have been xx when xx<yy.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-08-26 14:19:10 +09:00
parent 4e0da4f0d8
commit b158581118
+1 -1
View File
@@ -440,7 +440,7 @@ udiv(mrb_state *mrb, mpz_t *qq, mpz_t *rr, mpz_t *xx, mpz_t *yy)
}
else if (cmp < 0) {
zero(qq);
mpz_set(mrb, rr, yy);
mpz_set(mrb, rr, xx);
return;
}