IsUnboundVar should check addresses

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1144 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2004-09-18 14:03:42 +00:00
parent 2144835fe5
commit 2e2df1a64f
7 changed files with 26 additions and 20 deletions

View File

@@ -684,7 +684,7 @@ p_create_array(void)
ArrayEntry *app = (ArrayEntry *) pp;
WRITE_UNLOCK(ae->ARWLock);
if (!IsVarTerm(app->ValueOfVE) || !IsUnboundVar(app->ValueOfVE))
if (!IsVarTerm(app->ValueOfVE) || !IsUnboundVar(&app->ValueOfVE))
Yap_Error(PERMISSION_ERROR_CREATE_ARRAY,t,"create_array",
ae->StrOfAE);
else {
@@ -781,7 +781,7 @@ p_create_static_array(void)
return(FALSE);
return (TRUE);
} else if (ArrayIsDynamic(app)) {
if (IsVarTerm(app->ValueOfVE) && IsUnboundVar(app->ValueOfVE)) {
if (IsVarTerm(app->ValueOfVE) && IsUnboundVar(&app->ValueOfVE)) {
pp = CreateStaticArray(ae, size, props, NULL, pp);
if (pp == NULL)
return(FALSE);