Skip to content

Commit

Permalink
fix #2662
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Oct 28, 2019
1 parent 376d2c1 commit e24481d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/util/mpz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2034,8 +2034,9 @@ void mpz_manager<SYNCH>::machine_div2k(mpz & a, unsigned k) {
return;
if (is_small(a)) {
if (k < 32) {
int twok = 1 << k;
a.m_val /= twok;
int64_t twok = 1ull << ((int64_t)k);
int64_t val = a.m_val;
a.m_val = (int)(val/twok);
}
else {
a.m_val = 0;
Expand Down

0 comments on commit e24481d

Please sign in to comment.