Skip to content

Commit e9daeda

Browse files
authored
repo-sync-2025-04-28T11:15:36+0800 (#522)
1 parent 2c5824c commit e9daeda

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ parameters:
3131
setup: true
3232

3333
orbs:
34-
path-filtering: circleci/path-filtering@1.1.0
34+
path-filtering: circleci/path-filtering@1.2.0
3535

3636
workflows:
3737
unittest-workflow:
3838
jobs:
3939
- path-filtering/filter:
4040
base-revision: main
4141
config-path: .circleci/continue-config.yml
42+
tag: "3.9"
4243
mapping: |
4344
yacl/.* build-and-run true
4445
bazel/.* build-and-run true

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
module(
2323
name = "yacl",
24-
version = "0.4.5b11-nightly-20250423",
24+
version = "0.4.5b11-nightly-20250428",
2525
compatibility_level = 1,
2626
)
2727

yacl/math/bigint/bigint_test.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,8 @@ TEST_P(BigIntArithTest, SetBit) {
11821182
EXPECT_EQ(a.ToString(), "1234567891");
11831183
a.SetBit(0, 0);
11841184
EXPECT_EQ(a.ToString(), "1234567890");
1185+
a.SetBit(128, 0);
1186+
EXPECT_EQ(a.ToString(), "1234567890");
11851187

11861188
a.SetBit(31, 1);
11871189
EXPECT_EQ(a.ToString(), "3382051538");

yacl/math/bigint/openssl/bignum.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,10 @@ uint8_t BigNum::GetBit(size_t idx) const {
414414
}
415415

416416
void BigNum::SetBit(size_t idx, uint8_t bit) {
417-
if (bit == 0U && idx < BitCount()) {
418-
OSSL_RET_1(BN_clear_bit(bn_.get(), idx));
417+
if (bit == 0U) {
418+
if (idx < BitCount()) {
419+
OSSL_RET_1(BN_clear_bit(bn_.get(), idx));
420+
}
419421
} else {
420422
OSSL_RET_1(BN_set_bit(bn_.get(), idx));
421423
}

0 commit comments

Comments
 (0)