Commit 4e42d2c
[libc] Fix BigInt's operator %= (llvm#98484)
This patch fixes cases where we try to do var %= 1. Previously this operator was calling .div directly since it would perform the inplace division and return the remainder, however, as an early exit condition a division by one returns zero as the remainder. The remainder being returned by div was not being assigned to var.1 parent 3137ca1 commit 4e42d2c
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
| 735 | + | |
| 736 | + | |
736 | 737 | | |
737 | 738 | | |
738 | 739 | | |
| |||
0 commit comments