Test elliptic curves more thoroughly.
[u/mdw/catacomb] / gfreduce.c
index 819c276..929c46c 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: gfreduce.c,v 1.2 2004/03/21 22:52:06 mdw Exp $
+ * $Id: gfreduce.c,v 1.3 2004/03/23 15:19:32 mdw Exp $
  *
  * Efficient reduction modulo sparse binary polynomials
  *
@@ -30,6 +30,9 @@
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: gfreduce.c,v $
+ * Revision 1.3  2004/03/23 15:19:32  mdw
+ * Test elliptic curves more thoroughly.
+ *
  * Revision 1.2  2004/03/21 22:52:06  mdw
  * Merge and close elliptic curve branch.
  *
@@ -440,7 +443,7 @@ mp *gfreduce_quadsolve(gfreduce *r, mp *d, mp *x)
   }
   MP_DROP(t);
   MP_DROP(x);
-  d->v[0] &= ~(mpw)1;
+  if (d) d->v[0] &= ~(mpw)1;
   return (d);
 }