git.ucc.asn.au
/
ipdf
/
code.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1fab7e
)
Maybe this is more correct. realops likes it.
author
David Gow
<
[email protected]
>
Sun, 6 Jul 2014 14:31:09 +0000
(22:31 +0800)
committer
David Gow
<
[email protected]
>
Sun, 6 Jul 2014 14:31:09 +0000
(22:31 +0800)
src/arbint.cpp
patch
|
blob
|
history
diff --git
a/src/arbint.cpp
b/src/arbint.cpp
index
696dcd0
..
582d99a
100644
(file)
--- a/
src/arbint.cpp
+++ b/
src/arbint.cpp
@@
-203,7
+203,10
@@
Arbint & Arbint::SubBasic(const Arbint & sub)
{
m_sign = !m_sign;
for (unsigned i = 0; i < m_digits.size(); ++i)
- m_digits[i] = (~m_digits[i]) + 1;
+ m_digits[i] = (~m_digits[i]);
+ std::vector<digit_t> one_digits(m_digits.size(), 0L);
+ one_digits[0] = 1;
+ add_digits((digit_t*)m_digits.data(), (digit_t*)one_digits.data(), m_digits.size());
}
return *this;
}
UCC
git Repository :: git.ucc.asn.au