[bug] Typo fix. Renaming a variable created a bug.

This commit is contained in:
Elf M. Sternberg 2015-08-06 19:11:43 -07:00
parent be87d7868f
commit eb05624610
1 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ namespace cheapgmp {
void multiply(gmrep &multiplicand, ulong multiplier) { void multiply(gmrep &multiplicand, ulong multiplier) {
gmrep res(new lmrep()); gmrep res(new lmrep());
ulong rem = 0; ulong rem = 0;
for_each(multiplicand->rbegin(), multiplicand->rend(), [&rem, by](ulong &i) { for_each(multiplicand->rbegin(), multiplicand->rend(), [&rem, multiplier](ulong &i) {
ulong t = (i * multiplier) + rem ; ulong t = (i * multiplier) + rem ;
i = t % 10 ; i = t % 10 ;
rem = t / 10; rem = t / 10;
@ -23,7 +23,7 @@ namespace cheapgmp {
the new result is complete */ the new result is complete */
while(rem > 0) { while(rem > 0) {
in->push_front(rem % 10); multiplicand->push_front(rem % 10);
rem = rem / 10; rem = rem / 10;
} }
} }