3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-10 19:27:06 +00:00

Bugfix for zero-extend.

Fixes #548
This commit is contained in:
Christoph M. Wintersteiger 2016-04-01 12:48:06 +01:00
parent dcca3a9bb1
commit dafda681b2

View file

@ -370,9 +370,10 @@ bool bv_decl_plugin::get_concat_size(unsigned arity, sort * const * domain, int
}
bool bv_decl_plugin::get_extend_size(unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, int & result) {
unsigned arity, sort * const * domain, int & result) {
int arg_sz;
if (arity != 1 || num_parameters != 1 || !parameters[0].is_int() || !get_bv_size(domain[0], arg_sz)) {
if (arity != 1 || !get_bv_size(domain[0], arg_sz) ||
num_parameters != 1 || !parameters[0].is_int() || parameters[0].get_int() < 0) {
return false;
}
result = arg_sz + parameters[0].get_int();