cur_pred was overeager

This commit is contained in:
Vítor Santos Costa 2014-11-29 08:08:20 +00:00
parent 9f28f7e836
commit 5b37c15742

View File

@ -807,7 +807,7 @@ static Int cont_current_predicate(USES_REGS1) {
break; break;
} }
} }
if (!pp) { if (!pp && p) {
// try using outer loop // try using outer loop
for (; p; p = p->NextOfPE) { for (; p; p = p->NextOfPE) {
if (p->KindOfPE == PEProp) { if (p->KindOfPE == PEProp) {
@ -823,13 +823,12 @@ static Int cont_current_predicate(USES_REGS1) {
if (q->KindOfPE == PEProp) { if (q->KindOfPE == PEProp) {
pp = RepPredProp(q); pp = RepPredProp(q);
q = q->NextOfPE; q = q->NextOfPE;
if (!q) if (!q && !p->NextOfPE)
p = p->NextOfPE;
if (!p)
is_det = true; is_det = true;
break; break;
} }
} }
break;
} }
} }
} }