a bugfix which was causing an infinite loop in the C linearizer for some sentences

This commit is contained in:
kr.angelov
2013-04-05 09:11:24 +00:00
parent a449a240de
commit 9e741cfe30

View File

@@ -408,6 +408,11 @@ pgf_cnc_tree_enum_next(GuEnum* self, void* to, GuPool* pool)
PgfLzn* lzn = gu_container(self, PgfLzn, en);
PgfCncTree* toc = to;
if (lzn->ch == NULL) {
*toc = gu_null_variant;
return;
}
GuChoiceMark mark = gu_choice_mark(lzn->ch);
*toc = pgf_lzn_resolve(lzn, lzn->expr, NULL, pool);
gu_choice_reset(lzn->ch, mark);
@@ -426,7 +431,9 @@ pgf_cnc_tree_enum_next(GuEnum* self, void* to, GuPool* pool)
gu_pool_free(tmp_pool);
#endif
gu_choice_advance(lzn->ch);
if (!gu_choice_advance(lzn->ch)) {
lzn->ch = NULL;
}
}
PgfCncTreeEnum*