protect better call

This commit is contained in:
Vítor Santos Costa 2010-02-25 17:52:11 +00:00
parent 692a482adf
commit 6a7e584e94

View File

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