diff options
author | lloyd <[email protected]> | 2010-02-25 19:33:12 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-02-25 19:33:12 +0000 |
commit | 4eca3e8f0712cbd3380275a2782ee02d3dfb677c (patch) | |
tree | a321c6f7666795a9a08469aacc896c9fa323ccf0 | |
parent | e784e695aafc47060bf62a9e92042cc56556e8c6 (diff) |
In PointGFp::operator==, compare coordinates first, then the curve
-rw-r--r-- | src/math/gfpmath/point_gfp.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/math/gfpmath/point_gfp.cpp b/src/math/gfpmath/point_gfp.cpp index 034289190..e5236787e 100644 --- a/src/math/gfpmath/point_gfp.cpp +++ b/src/math/gfpmath/point_gfp.cpp @@ -345,12 +345,10 @@ void PointGFp::swap(PointGFp& other) bool PointGFp::operator==(const PointGFp& other) const { - if(get_curve() != other.get_curve()) - return false; - return (coord_x == other.coord_x && coord_y == other.coord_y && - coord_z == other.coord_z); + coord_z == other.coord_z && + get_curve() == other.get_curve()); } // arithmetic operators |