From 3aaa5ce601b009373fa7464f6de044f7b2e017ea Mon Sep 17 00:00:00 2001 From: Matt McCutchen Date: Sat, 27 Jan 2007 16:06:25 -0500 Subject: [PATCH] Old snapshot `bigint-2006.08.14'; see the ChangeLog file. --- .cdtproject | 57 -------------------------------- .project | 89 -------------------------------------------------- BigUnsigned.cc | 2 +- ChangeLog | 4 +++ 4 files changed, 5 insertions(+), 147 deletions(-) delete mode 100644 .cdtproject delete mode 100644 .project diff --git a/.cdtproject b/.cdtproject deleted file mode 100644 index 998bcd2..0000000 --- a/.cdtproject +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.project b/.project deleted file mode 100644 index d6e8622..0000000 --- a/.project +++ /dev/null @@ -1,89 +0,0 @@ - - - bigint - - - - - - org.eclipse.cdt.make.core.makeBuilder - - - org.eclipse.cdt.make.core.build.arguments - - - - org.eclipse.cdt.core.errorOutputParser - org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser; - - - org.eclipse.cdt.make.core.enableAutoBuild - true - - - org.eclipse.cdt.make.core.environment - - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.build.target.inc - all - - - org.eclipse.cdt.make.core.enabledIncrementalBuild - true - - - org.eclipse.cdt.make.core.build.location - - - - org.eclipse.cdt.make.core.build.target.clean - clean - - - org.eclipse.cdt.make.core.build.command - make - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.build.target.full - clean all - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - org.eclipse.cdt.make.core.build.target.auto - all - - - org.eclipse.cdt.make.core.stopOnError - false - - - - - org.eclipse.cdt.make.core.ScannerConfigBuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.make.core.makeNature - org.eclipse.cdt.make.core.ScannerConfigNature - org.eclipse.cdt.core.ccnature - - diff --git a/BigUnsigned.cc b/BigUnsigned.cc index ecf1055..ad96026 100644 --- a/BigUnsigned.cc +++ b/BigUnsigned.cc @@ -731,7 +731,7 @@ void BigUnsigned::bitXor(const BigUnsigned &a, const BigUnsigned &b) { a2 = &b; b2 = &a; } - allocate(b2->len); + allocate(a2->len); for (i = 0; i < b2->len; i++) blk[i] = a2->blk[i] ^ b2->blk[i]; for (; i < a2->len; i++) diff --git a/ChangeLog b/ChangeLog index 759e629..45e36b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ Change Log ========== These entries tell you what was added, fixed, or improved in each version as compared to the previous one. In case you haven't noticed, a version number roughly corresponds to the release date of that version in `YYYY.MM.DD[.N]' format, where `.N' goes `.2', `.3', etc. if there are multiple versions on the same day. +2006.08.14 +---------- +In BigUnsigned::bitXor, change allocate(b2->len) to allocate(a2->len): we should allocate enough space for the longer number, not the shorter one! Thanks to Sriram Sankararaman for pointing this out. + 2006.05.03 ---------- I ran the sample program using valgrind and discovered a `delete s' that should be `delete [] s' and a `len++' before an `allocateAndCopy(len)' that should have been after an `allocateAndCopy(len + 1)'. I fixed both. Yay for valgrind! -- 2.34.1