Skip to content

Commit

Permalink
fix regression in FPNumRef sign
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Aug 18, 2021
1 parent b3db9a1 commit d980ee0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/python/z3/z3.py
Original file line number Diff line number Diff line change
Expand Up @@ -9581,7 +9581,7 @@ class FPNumRef(FPRef):

def sign(self):
num = (ctypes.c_int)()
nsign = Z3_fpa_get_numeral_sign(self.ctx.ref(), self.as_ast(), byref(l))
nsign = Z3_fpa_get_numeral_sign(self.ctx.ref(), self.as_ast(), byref(num))
if nsign is False:
raise Z3Exception("error retrieving the sign of a numeral.")
return num.value != 0
Expand Down
4 changes: 4 additions & 0 deletions src/cmd_context/cmd_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,11 @@ bool cmd_context::try_mk_pdecl_app(symbol const & s, unsigned num_args, expr * c
return true;
if (m().is_uninterp(ps) && ps->get_name().is_numerical()) {
int index = ps->get_name().get_num();
if (index < 0)
return false;
binding.reserve(index + 1);
if (binding.get(index) && binding.get(index) != s)
return false;
binding[index] = s;
return true;
}
Expand Down

0 comments on commit d980ee0

Please sign in to comment.