From 94b2b181a74961758b29eaa4f64d0e2fa4fe8188 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sat, 4 Apr 2009 23:56:42 +0100 Subject: [PATCH] do not deref because you may want to pass a pointer. --- C/mavar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C/mavar.c b/C/mavar.c index 2e553c517..6d8ca203a 100644 --- a/C/mavar.c +++ b/C/mavar.c @@ -123,7 +123,7 @@ NewTimedVar(CELL val) { Term out; timed_var *tv; - if (IsVarTerm((val = Deref(val))) && + if (IsVarTerm(val) && VarOfTerm(val) > H) { Term nval = MkVarTerm(); Bind_Local(VarOfTerm(val), nval); @@ -178,7 +178,7 @@ UpdateTimedVar(Term inv, Term new) timed_var *tv = (timed_var *)(RepAppl(inv)+1); CELL t = tv->value; CELL* timestmp = (CELL *)(tv->clock); - if (IsVarTerm((new = Deref(new))) && + if (IsVarTerm(new) && VarOfTerm(new) > H) { Term nnew = MkVarTerm(); Bind_Local(VarOfTerm(new), nnew);