mirror of
https://github.com/Z3Prover/z3
synced 2025-05-06 15:25:46 +00:00
don't crash in Z3_model_eval API if not given a valid expression
Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
This commit is contained in:
parent
e81dc5a0a0
commit
3104d2954c
3 changed files with 3 additions and 4 deletions
|
@ -153,6 +153,7 @@ extern "C" {
|
|||
if (v) *v = 0;
|
||||
RESET_ERROR_CODE();
|
||||
CHECK_NON_NULL(m, Z3_FALSE);
|
||||
CHECK_IS_EXPR(t, Z3_FALSE);
|
||||
model * _m = to_model_ref(m);
|
||||
expr_ref result(mk_c(c)->m());
|
||||
_m->eval(to_expr(t), result, model_completion == Z3_TRUE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue