Explorar el Código

fixing make_affine()

tristangurtler hace 3 años
padre
commit
cfed4e2da5
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      bgn2/src/Bipoint.cpp

+ 2 - 2
bgn2/src/Bipoint.cpp

@@ -158,9 +158,9 @@ void CurveBipoint::make_affine()
 
 void TwistBipoint::make_affine()
 {
-	if (!(fp2e_isone(point[0]->m_z) || ))
+	if (!(fp2e_isone(point[0]->m_z) || fp2e_iszero(point[0]->m_z)))
 		twistpoint_fp2_makeaffine(point[0]);
-	if (!(fp2e_isone(point[1]->m_z)))
+	if (!(fp2e_isone(point[1]->m_z) || fp2e_iszero(point[0]->m_z)))
 		twistpoint_fp2_makeaffine(point[1]);
 }