From 3e696eb83127051433543a83f838407753bd6f82 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 23 Oct 2012 18:22:16 +0100 Subject: [PATCH] fix bad index removal --- C/index.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C/index.c b/C/index.c index 5e1ba734d..76e4788d6 100644 --- a/C/index.c +++ b/C/index.c @@ -6007,6 +6007,9 @@ Yap_RemoveClauseFromIndex(PredEntry *ap, yamop *beg) { ap->OpcodeOfPred = Yap_opcode(_op_fail); } else if (ap->PredFlags & IndexedPredFlag) { remove_from_index(ap, sp, &cl, beg, last, &cint); + } else if (ap->cs.p_code.NOfClauses == 1) { + ap->cs.p_code.TrueCodeOfPred = ap->cs.p_code.FirstClause; + ap->CodeOfPred = (yamop *)(&(ap->OpcodeOfPred)); } }