Merge pull request #1436 from wendal/patch-3

fix: sm2_point_from_x函数内的表达式应该明确优先级
This commit is contained in:
Zhi Guan
2023-03-23 15:52:01 +08:00
committed by GitHub

View File

@@ -1115,7 +1115,7 @@ int sm2_point_from_x(SM2_POINT *P, const uint8_t x[32], int y)
return -1;
}
if ((y == 0x02 && sm2_bn_is_odd(_y)) || (y == 0x03) && !sm2_bn_is_odd(_y)) {
if ((y == 0x02 && sm2_bn_is_odd(_y)) || ((y == 0x03) && !sm2_bn_is_odd(_y))) {
sm2_fp_neg(_y, _y);
}