chiark / gitweb /
ec: Fix oncurvep.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 4 Apr 2008 23:54:42 +0000 (00:54 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 4 Apr 2008 23:54:42 +0000 (00:54 +0100)
The previous version didn't take into account the fact that we had
internal-format points.

ec.c

diff --git a/ec.c b/ec.c
index 67bbeefffec6bcceb74a5d8ac822739adf4cbdec..f31670e3a2f904a6dfab36feba9788d9f3355f1d 100644 (file)
--- a/ec.c
+++ b/ec.c
@@ -233,7 +233,8 @@ end:
 static PyObject *epmeth_oncurvep(PyObject *me, PyObject *arg)
 {
   if (!PyArg_ParseTuple(arg, ":oncurvep")) return (0);
-  return (getbool(!ec_check(ECPT_C(me), ECPT_P(me))));
+  return (getbool(EC_ATINF(ECPT_P(me)) ||
+                 !EC_CHECK(ECPT_C(me), ECPT_P(me))));
 }
 
 static PyObject *epmeth_dbl(PyObject *me, PyObject *arg)