mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
fix regression, issue #1028
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
d2ac59f238
commit
7fab670719
|
@ -447,16 +447,12 @@ br_status seq_rewriter::mk_seq_unit(expr* e, expr_ref& result) {
|
||||||
// specifically we want (_ BitVector 8)
|
// specifically we want (_ BitVector 8)
|
||||||
rational n_val;
|
rational n_val;
|
||||||
unsigned int n_size;
|
unsigned int n_size;
|
||||||
if (bvu.is_numeral(e, n_val, n_size)) {
|
if (bvu.is_numeral(e, n_val, n_size) && n_size == 8) {
|
||||||
if (n_size == 8) {
|
// convert to string constant
|
||||||
// convert to string constant
|
zstring str(n_val.get_unsigned());
|
||||||
char ch = (char)n_val.get_int32();
|
TRACE("seq", tout << "rewrite seq.unit of 8-bit value " << n_val.to_string() << " to string constant \"" << str<< "\"" << std::endl;);
|
||||||
TRACE("seq", tout << "rewrite seq.unit of 8-bit value " << n_val.to_string() << " to string constant \"" << ch << "\"" << std::endl;);
|
result = m_util.str.mk_string(str);
|
||||||
char s_tmp[2] = {ch, '\0'};
|
return BR_DONE;
|
||||||
symbol s(s_tmp);
|
|
||||||
result = m_util.str.mk_string(s);
|
|
||||||
return BR_DONE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue