From: Mark Wooding Date: Fri, 18 Oct 2019 20:16:24 +0000 (+0100) Subject: ec.c: Fix three-argument point construction. X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/commitdiff_plain/2ee1ed3080ab5f071e4e9a4c7362f681d7a16db5 ec.c: Fix three-argument point construction. This has been wrong literally forever. --- diff --git a/ec.c b/ec.c index c603489..64ac276 100644 --- a/ec.c +++ b/ec.c @@ -419,9 +419,9 @@ static int ecptxl_3(ec_curve *c, ec *p, if (!x || !y || !z) TYERR("missing argument"); if (!c) VALERR("internal form with no curve!"); - if ((p->x == coord_in(c->f, x)) == 0 || - (p->y == coord_in(c->f, y)) == 0 || - (z != Py_None && (p->z = coord_in(c->f, z))) == 0) + if ((p->x = coord_in(c->f, x)) == 0 || + (p->y = coord_in(c->f, y)) == 0 || + (z != Py_None && (p->z = coord_in(c->f, z)) == 0)) goto end; if (!p->z) p->z = MP_COPY(c->f->one); /* just in case */ rc = 0;