Skip to content

Commit

Permalink
Don't narrow
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Mar 7, 2024
1 parent 4a64c53 commit c33c859
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions duel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ void duel::set_response(const void* resp, size_t len) {
int32_t duel::get_next_integer(int32_t l, int32_t h) {
const uint32_t range = h - l + 1;
const uint32_t lim = random.max() % range;
uint32_t n;
uint64_t n;
do {
n = static_cast<uint32_t>(random());
n = random();
} while(n <= lim);
return static_cast<int32_t>(n % range) + l;
}
Expand Down

0 comments on commit c33c859

Please sign in to comment.