Skip to content

Commit f09f134

Browse files
committed
Fix copy for other memory allocators.
1 parent a143e5a commit f09f134

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/epx/relic_ep2_curve.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,8 +852,10 @@ void ep2_curve_set_twist(int type) {
852852
/* I don't have a better place for this. */
853853
fp_prime_calc();
854854

855-
fp2_copy(ctx->ep2_frb[0], ctx->fp2_p1[1]);
856-
fp2_copy(ctx->ep2_frb[1], ctx->fp2_p1[2]);
855+
fp_copy(ctx->ep2_frb[0][0], ctx->fp2_p1[1][0]);
856+
fp_copy(ctx->ep2_frb[0][1], ctx->fp2_p1[1][1]);
857+
fp_copy(ctx->ep2_frb[1][0], ctx->fp2_p1[2][0]);
858+
fp_copy(ctx->ep2_frb[1][1], ctx->fp2_p1[2][1]);
857859
if (type == RLC_EP_MTYPE) {
858860
fp2_inv(ctx->ep2_frb[0], ctx->ep2_frb[0]);
859861
fp2_inv(ctx->ep2_frb[1], ctx->ep2_frb[1]);

0 commit comments

Comments
 (0)