Skip to content

Commit 63fc278

Browse files
committed
maybe fix mock owo
1 parent 1221ab2 commit 63fc278

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# v1.0.2
2+
- Fix issue with *Mock your 90%+ Fail* option fetching records
23
- Fix UI ordering issues
34

45
# v1.0.1

src/hooks/Mock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ class $modify(MockMenuLayer, MenuLayer) {
4242
auto const mockConfigUnwr = mockConfig.unwrapOr(matjson::Value());
4343

4444
auto const lvlUnwr = mockConfigUnwr.begin();
45-
auto const lvl = lvlUnwr->get(rng::get(lvlUnwr->size())).unwrapOr(matjson::Value());
45+
auto const lvl = lvlUnwr->get(rng::get(lvlUnwr->size() - 1)).unwrapOr(matjson::Value());
4646

4747
auto const id = lvl.getKey().value_or("");
48-
auto percent = lvl.asInt().unwrapOr(99);
48+
auto percent = lvl.asInt().unwrapOr(90);
4949

5050
if (!id.empty()) {
5151
log::trace("ID {} with percentage {} is valid", id, percent);

0 commit comments

Comments
 (0)