math/mp-gcd.c: Avoid clobbering constants during the sign fixup.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 27 Dec 2013 12:00:53 +0000 (12:00 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 27 Dec 2013 12:00:53 +0000 (12:00 +0000)
commit9b8ff1cfc6305fc32614c20a00c168e9a268c949
tree5ff12a9663c1911c76af8e804e3a7d1a29e55941
parentf23d8ad26a2b88e07d93b0034685223b34cc790a
math/mp-gcd.c: Avoid clobbering constants during the sign fixup.

If the GCD computation was trivial, then the state still contains
references to the constants `MP_ZERO' and `MP_ONE'.  It would be Really Bad
to trash their signs -- in particular, this causes comparisons with
`MP_ONE' to fail, leading to an assertion failure from `mp_modinv'.
math/mp-gcd.c
math/t/mp