protect better call

This commit is contained in:
Vítor Santos Costa 2010-02-25 17:52:11 +00:00
parent 692a482adf
commit 6a7e584e94
1 changed files with 7 additions and 1 deletions

View File

@ -729,8 +729,14 @@ p_execute_nonstop(void)
Prop pe;
restart_exec:
if (IsVarTerm(mod)) {
mod = CurrentModule;
} else if (!IsAtomTerm(mod)) {
Yap_Error(TYPE_ERROR_ATOM, ARG2, "call/1");
return FALSE;
}
if (IsVarTerm(t)) {
Yap_Error(INSTANTIATION_ERROR,ARG3,"call/1");
Yap_Error(INSTANTIATION_ERROR,ARG1,"call/1");
return FALSE;
} else if (IsAtomTerm(t)) {
Atom a = AtomOfTerm(t);