Matt McCutchen's Web Site
/
bigint
/
bigint.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Old snapshot `bigint-2006.05.03'; see the ChangeLog file.
[bigint/bigint.git]
/
BigUnsigned.cc
diff --git
a/BigUnsigned.cc
b/BigUnsigned.cc
index
33fe0af
..
ecf1055
100644
(file)
--- a/
BigUnsigned.cc
+++ b/
BigUnsigned.cc
@@
-562,8
+562,9
@@
void BigUnsigned::divideWithRemainder(const BigUnsigned &b, BigUnsigned &q) {
* amusing story of this section of code.
*/
Index origLen = len; // Save real length.
* amusing story of this section of code.
*/
Index origLen = len; // Save real length.
+ // 2006.05.03: Copy the number and then change the length!
+ allocateAndCopy(len + 1); // Get the space.
len++; // Increase the length.
len++; // Increase the length.
- allocateAndCopy(len); // Get the space.
blk[origLen] = 0; // Zero the extra block.
// work2 holds part of the result of a subtraction; see above.
blk[origLen] = 0; // Zero the extra block.
// work2 holds part of the result of a subtraction; see above.