3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

Bugfix for Z3_fpa_get_numeral_*_uint64. Relates to #570.

This commit is contained in:
Christoph M. Wintersteiger 2016-11-10 21:15:43 +00:00
parent 1188e6df47
commit b47c67dee3

View file

@ -968,6 +968,10 @@ extern "C" {
Z3_TRY;
LOG_Z3_fpa_get_numeral_significand_uint64(c, t, n);
RESET_ERROR_CODE();
if (n == 0) {
SET_ERROR_CODE(Z3_INVALID_ARG);
return 0;
}
ast_manager & m = mk_c(c)->m();
mpf_manager & mpfm = mk_c(c)->fpautil().fm();
unsynch_mpz_manager & mpzm = mpfm.mpz_manager();
@ -1028,6 +1032,10 @@ extern "C" {
Z3_TRY;
LOG_Z3_fpa_get_numeral_exponent_int64(c, t, n);
RESET_ERROR_CODE();
if (n == 0) {
SET_ERROR_CODE(Z3_INVALID_ARG);
return 0;
}
ast_manager & m = mk_c(c)->m();
mpf_manager & mpfm = mk_c(c)->fpautil().fm();
family_id fid = mk_c(c)->get_fpa_fid();