Fix possible issue in corner-case for ecp_mul_mx()
diff --git a/library/ecp.c b/library/ecp.c
index 0cb61f4..02f1b61 100644
--- a/library/ecp.c
+++ b/library/ecp.c
@@ -1540,6 +1540,9 @@
     MPI_CHK( mpi_lset( &R->Z, 0 ) );
     mpi_free( &R->Y );
 
+    /* RP.X might be sligtly larger than P, so reduce it */
+    MOD_ADD( RP.X );
+
     /* Randomize coordinates of the starting point */
     if( f_rng != NULL )
         MPI_CHK( ecp_randomize_mxz( grp, &RP, f_rng, p_rng ) );