protect better call
This commit is contained in:
parent
692a482adf
commit
6a7e584e94
8
C/exec.c
8
C/exec.c
@ -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);
|
||||||
|
Reference in New Issue
Block a user