fix setarg(0,T,_).
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@853 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
1e62accfaa
commit
a154a3f6e8
@ -58,10 +58,13 @@ p_setarg(void)
|
||||
Yap_Error(TYPE_ERROR_COMPOUND,ts,"setarg/3");
|
||||
return(FALSE);
|
||||
}
|
||||
if (i < 0 || i > (Int)ArityOfFunctor(FunctorOfTerm(ts))) {
|
||||
if (i < 1 || i > (Int)ArityOfFunctor(FunctorOfTerm(ts))) {
|
||||
if (i<0)
|
||||
Yap_Error(DOMAIN_ERROR_NOT_LESS_THAN_ZERO,ts,"setarg/3");
|
||||
return(FALSE);
|
||||
if (i==0)
|
||||
Yap_Error(DOMAIN_ERROR_NOT_ZERO,ts,"setarg/3");
|
||||
return(FALSE);
|
||||
}
|
||||
pt = RepAppl(ts)+i;
|
||||
/* the evil deed is to be done now */
|
||||
|
Reference in New Issue
Block a user