From: mdw Date: Mon, 22 Nov 1999 20:49:56 +0000 (+0000) Subject: Fix bug which failed to favour `x' when `y' wasn't wanted and the two X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/commitdiff_plain/da83a5610ddde70bfae47b83707f6e80bce07467 Fix bug which failed to favour `x' when `y' wasn't wanted and the two arguments needed swapping. --- diff --git a/mp-gcd.c b/mp-gcd.c index 8298698..19192f5 100644 --- a/mp-gcd.c +++ b/mp-gcd.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: mp-gcd.c,v 1.1 1999/11/17 18:02:16 mdw Exp $ + * $Id: mp-gcd.c,v 1.2 1999/11/22 20:49:56 mdw Exp $ * * Extended GCD calculation * @@ -30,6 +30,10 @@ /*----- Revision history --------------------------------------------------* * * $Log: mp-gcd.c,v $ + * Revision 1.2 1999/11/22 20:49:56 mdw + * Fix bug which failed to favour `x' when `y' wasn't wanted and the two + * arguments needed swapping. + * * Revision 1.1 1999/11/17 18:02:16 mdw * New multiprecision integer arithmetic suite. * @@ -223,6 +227,7 @@ void mp_gcd(mp **gcd, mp **xx, mp **yy, mp *a, mp *b) if (ext) { if (swap) { mp *t = x; x = y; y = t; + t = a; a = b; b = t; } if (yy) { if (y->f & MP_NEG) {