From 2aff3b507125c40607517635f036acb902adc604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa=20II?= Date: Sat, 10 Apr 2010 21:17:17 +0100 Subject: [PATCH] clean reference to removed element. --- C/globals.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C/globals.c b/C/globals.c index dba194e88..4561baf05 100644 --- a/C/globals.c +++ b/C/globals.c @@ -1708,6 +1708,8 @@ DelHeapRoot(CELL *pt, UInt sz) sz--; tk = pt[2*sz]; tv = pt[2*sz+1]; + pt[2*sz] = TermNil; + pt[2*sz+1] = TermNil; while (TRUE) { if (sz < 2*indx+3 || Yap_compare_terms(pt[4*indx+2],pt[4*indx+4]) < 0) { if (sz < 2*indx+2 || Yap_compare_terms(tk, pt[4*indx+2]) < 0) {