From 55e37020a48b062a03aff2c5d56db1fad02f65f8 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sun, 17 May 2009 09:41:59 -0700 Subject: [PATCH] return copy when copying term --- C/globals.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C/globals.c b/C/globals.c index 1798475de..a3ef4809a 100644 --- a/C/globals.c +++ b/C/globals.c @@ -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