From 56c5f0dffd3db0eb8cb5c5ca22b280d954c2aa08 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Thu, 29 Jun 2017 17:26:21 +0900 Subject: [PATCH] fix typo --- include/mcl/bgn.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mcl/bgn.hpp b/include/mcl/bgn.hpp index 7931061..38070d2 100644 --- a/include/mcl/bgn.hpp +++ b/include/mcl/bgn.hpp @@ -61,11 +61,11 @@ public: kcv.resize(hashSize); G xP; xP.clear(); - for (size_t i = 1; i <= (int)hashSize; i++) { + for (int i = 1; i <= (int)hashSize; i++) { xP += P; xP.normalize(); kcv[i - 1].key = uint32_t(*xP.x.getUnit()); - kcv[i - 1].count = xP.y.isOdd() ? i : -1; + kcv[i - 1].count = xP.y.isOdd() ? i : -i; } nextP = xP; G::dbl(nextP, nextP);