mirror of
https://github.com/Z3Prover/z3
synced 2025-06-07 06:33:23 +00:00
parent
cdf3c48349
commit
0d004b5232
1 changed files with 2 additions and 2 deletions
|
@ -1788,8 +1788,8 @@ void mpz_manager<SYNCH>::display_hex(std::ostream & out, mpz const & a, unsigned
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_binary_data(std::ostream &out, unsigned val, unsigned numBits) {
|
void display_binary_data(std::ostream &out, unsigned val, unsigned numBits) {
|
||||||
SASSERT(numBits <= sizeof(unsigned)*8);
|
for (unsigned shift = numBits; shift-- > 32; ) out << "0";
|
||||||
for (int shift = numBits-1; shift >= 0; --shift) {
|
for (unsigned shift = std::min(32u, numBits); shift-- > 0; ) {
|
||||||
if (val & (1 << shift)) {
|
if (val & (1 << shift)) {
|
||||||
out << "1";
|
out << "1";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue