return copy when copying term

This commit is contained in:
Vitor Santos Costa 2009-05-17 09:41:59 -07:00
parent 94e740ae31
commit 55e37020a4
1 changed files with 2 additions and 2 deletions

View File

@ -1182,11 +1182,11 @@ Yap_SetGlobalVal(Atom at, Term t0)
ge = GetGlobalEntry(at);
to = CopyTermToArena(t0, GlobalArena, FALSE, 2, &GlobalArena, &GlobalDelayArena, garena_overflow_size(ArenaPt(GlobalArena)));
if (to == 0L)
return FALSE;
return to;
WRITE_LOCK(ge->GRWLock);
ge->global=to;
WRITE_UNLOCK(ge->GRWLock);
return TRUE;
return to;
}
static Int